HTTP-01 Challenge DNS Configuration
HTTP-01 validation requires proper DNS A/AAAA records pointing to servers hosting challenge responses, so certificate authorities can resolve and reach validation endpoints on port 80. This guide covers DNS requirements, verification steps, and how to fix resolution issues that break HTTP-01.
HTTP-01 Challenge DNS Configuration
Section titled “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.
Need help with ACME? Ask Axel Axelspire AI bot with own augmented memory for all ACME/certbot.
Overview
Section titled “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
Section titled “DNS Record Requirements”Primary A/AAAA Records
Section titled “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 configurationexample.com. IN A 192.0.2.100www.example.com. IN A 192.0.2.100
# For IPv6 environmentsexample.com. IN AAAA 2001:db8::1www.example.com. IN AAAA 2001:db8::1DNS Resolution Verification
Section titled “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 locationsdig +short example.com @8.8.8.8dig +short example.com @1.1.1.1dig +short example.com @208.67.222.222
# Verify reverse DNS if requireddig +short -x 192.0.2.100Challenge Endpoint Configuration
Section titled “Challenge Endpoint Configuration”ACME Validation Endpoint Setup
Section titled “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 accessibilitycurl -I http://example.com/.well-known/acme-challenge/testcurl -I http://www.example.com/.well-known/acme-challenge/test
# Verify from multiple external locationscurl -H "Host: example.com" http://192.0.2.100/.well-known/acme-challenge/testToken Location DNS Considerations
Section titled “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
Section titled “Enterprise DNS Patterns”Load Balancer Integration
Section titled “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 setupdns_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: 300Multi-Region DNS Setup
Section titled “Multi-Region DNS Setup”Configure DNS with appropriate TTL values to support certificate renewal across multiple regions:
# Set lower TTL during certificate operationsexample.com. 300 IN A 192.0.2.100example.com. 300 IN A 192.0.2.101Troubleshooting DNS Issues
Section titled “Troubleshooting DNS Issues”Common DNS Problems
Section titled “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.
- Propagation Delays: Use lower TTL values (300 seconds) during certificate operations
- CDN Interference: Ensure CDN allows HTTP traffic to
/.well-known/acme-challenge/ - Wildcard Certificates: HTTP-01 challenges cannot validate wildcard certificates
Verification Commands
Section titled “Verification Commands”# Complete DNS verification workflownslookup example.comdig example.com +tracehost -t A example.com
# Test challenge endpoint reachabilitywget --spider http://example.com/.well-known/acme-challenge/curl -v http://example.com/.well-known/acme-challenge/test-tokenDNS Security Considerations
Section titled “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 authoritiesexample.com. IN CAA 0 issue "letsencrypt.org"example.com. IN CAA 0 iodef "mailto:admin@example.com"Related Documentation
Section titled “Related Documentation”- HTTP-01 Challenge Overview - Architectural patterns and validation flow
- HTTP-01 Challenge Configuration - Web server and file placement
- HTTP-01 Challenge Troubleshooting - DNS resolution error patterns
- DNS-01 Challenge Validation - DNS TXT record validation method
- Certificate Lifecycle Management - Automated certificate renewal
- Common PKI Misconfigurations - Firewall and port configuration