Skip to content

HTTP-01 Challenge DNS Configuration

TL;DR: HTTP-01 validation requires proper DNS A/AAAA records pointing to servers hosting challenge responses, ensuring certificate authorities can resolve and reach validation endpoints on port 80.

Overview

DNS configuration forms the foundation of HTTP-01 challenge validation by directing certificate authorities to the correct servers hosting challenge responses. This guide covers DNS record requirements, verification procedures, and troubleshooting patterns for successful domain validation. Operations teams configure DNS records to ensure ACME validation servers can reach challenge endpoints during certificate issuance.

Production certificate automation depends on reliable DNS resolution from external networks. Certificate authorities must resolve domain names to IP addresses where web servers host the /.well-known/acme-challenge/ endpoints. Proper DNS setup prevents common validation failures caused by resolution delays, incorrect IP mappings, or IPv6 configuration issues.

Enterprise DNS patterns address load balancer integration, multi-region deployments, and CDN configurations that affect HTTP-01 validation. Understanding DNS requirements helps teams design infrastructure that supports automated certificate management while maintaining operational reliability and security compliance.

DNS Record Requirements

Primary A/AAAA Records

For HTTP-01 challenge validation, your domain must have proper A/AAAA records pointing to the server hosting your domain. These records are the foundation of HTTP-01 challenge validation, as they direct the certificate authority to the correct IP address where the challenge response will be served.

# Example DNS A record configuration
example.com.        IN  A       192.0.2.100
www.example.com.    IN  A       192.0.2.100

# For IPv6 environments
example.com.        IN  AAAA    2001:db8::1
www.example.com.    IN  AAAA    2001:db8::1

DNS Resolution Verification

Before initiating the HTTP-01 challenge process, verify that Let's Encrypt HTTP-01 challenge DNS resolution works correctly from external networks. The certificate authority must be able to resolve your domain name to reach the challenge endpoint.

# Test DNS resolution from multiple locations
dig +short example.com @8.8.8.8
dig +short example.com @1.1.1.1
dig +short example.com @208.67.222.222

# Verify reverse DNS if required
dig +short -x 192.0.2.100

Challenge Endpoint Configuration

ACME Validation Endpoint Setup

Configure your DNS to support the ACME HTTP-01 challenge validation endpoint at /.well-known/acme-challenge/. This endpoint must be accessible via HTTP on port 80, regardless of whether your main site runs on HTTPS.

# Test endpoint accessibility
curl -I http://example.com/.well-known/acme-challenge/test
curl -I http://www.example.com/.well-known/acme-challenge/test

# Verify from multiple external locations
curl -H "Host: example.com" http://192.0.2.100/.well-known/acme-challenge/test

Token Location DNS Considerations

The HTTP-01 challenge token location must be reachable through your configured DNS records. Ensure that all domain variants (with and without www) resolve to the same server hosting the challenge responses.

# Apache virtual host configuration
<VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com

    # Ensure challenge directory is accessible
    Alias /.well-known/acme-challenge/ /var/www/challenges/
    <Directory "/var/www/challenges">
        Options None
        AllowOverride None
        Require all granted
    </Directory>
</VirtualHost>

Enterprise DNS Patterns

Load Balancer Integration

For enterprise deployments, configure DNS records to point to load balancers that can route HTTP-01 challenge requests to appropriate backend servers:

# Example DNS configuration for load-balanced setup
dns_records:
  - name: "example.com"
    type: "A"
    value: "10.0.1.100"  # Load balancer IP
    ttl: 300
  - name: "www.example.com"
    type: "CNAME"
    value: "example.com"
    ttl: 300

Multi-Region DNS Setup

Configure DNS with appropriate TTL values to support certificate renewal across multiple regions:

# Set lower TTL during certificate operations
example.com.    300   IN  A       192.0.2.100
example.com.    300   IN  A       192.0.2.101

Troubleshooting DNS Issues

Common DNS Problems

HTTP-01 only depends on the DNS to correctly point to your servers. Unlike DNS-01, it does not require validation records for actualy certificate issuance. The records below are typically re-used without change.

  1. Propagation Delays: Use lower TTL values (300 seconds) during certificate operations
  2. CDN Interference: Ensure CDN allows HTTP traffic to /.well-known/acme-challenge/
  3. Wildcard Certificates: HTTP-01 challenges cannot validate wildcard certificates

Verification Commands

# Complete DNS verification workflow
nslookup example.com
dig example.com +trace
host -t A example.com

# Test challenge endpoint reachability
wget --spider http://example.com/.well-known/acme-challenge/
curl -v http://example.com/.well-known/acme-challenge/test-token

DNS Security Considerations

Implement DNS security measures while maintaining HTTP-01 challenge compatibility:

# DNSSEC configuration (example)
example.com.    IN  DNSKEY  256 3 8 AwEAAb...
example.com.    IN  DS      12345 8 2 ABC123...

# CAA records to restrict certificate authorities
example.com.    IN  CAA     0 issue "letsencrypt.org"
example.com.    IN  CAA     0 iodef "mailto:[email protected]"