DNS Record Validator

Quickly validate common DNS record values.

About This Tool

The DNS Record Validator checks DNS record syntax and values before deployment, helping prevent configuration errors that could cause service outages. This tool validates common record types (A, AAAA, CNAME, MX, TXT, SRV) according to RFC specifications, catching mistakes like invalid IP addresses, malformed domain names, CNAME loops, and incorrect SRV formatting. Whether you're migrating DNS zones, setting up new services, or troubleshooting DNS issues, this validator provides instant feedback with specific error messages and warnings to ensure your DNS records are correctly formatted before going live.

How to Use

  1. Enter the DNS record name (e.g., www.example.com, @, _service._tcp.example.com)
  2. Select the record type (A, AAAA, CNAME, MX, TXT, or SRV)
  3. Enter the record value based on type:
  4. - A: IPv4 address (e.g., 192.0.2.1)
  5. - AAAA: IPv6 address (e.g., 2001:db8::1)
  6. - CNAME: Target domain (e.g., target.example.com)
  7. - MX: Priority and mail server (e.g., 10 mail.example.com)
  8. - TXT: Text value (e.g., "v=spf1 include:_spf.google.com ~all")
  9. - SRV: Priority, weight, port, and target (e.g., 10 5 80 target.example.com)
  10. Click "Validate" to check the record
  11. Review results showing valid/invalid status, errors, and warnings

Features

  • Validates A, AAAA, CNAME, MX, TXT, and SRV records
  • RFC-compliant syntax checking
  • Domain name validation (labels, length, characters)
  • IPv4 and IPv6 address validation
  • MX priority and target validation
  • SRV record parameter checking
  • CNAME conflict detection warnings
  • Clear error messages with specific issues
  • Warning system for potential problems
  • Instant validation feedback

Common Use Cases

  • Pre-deployment DNS record validation
  • Preventing DNS configuration errors
  • Troubleshooting DNS zone file syntax
  • Migrating DNS records between providers
  • Training and educational demonstrations
  • Automated DNS record generation validation
  • Zone file linting in CI/CD pipelines
  • Documenting DNS record requirements
  • Verifying third-party DNS instructions
  • Audit and compliance checking

Technical Details

The DNS Record Validator performs syntax and semantic validation according to DNS RFCs, checking both record format and domain name compliance.

A Record Validation (IPv4):

  • Format: name IN A ipv4_address
  • Example: www.example.com IN A 192.0.2.1
  • Checks:
    • Value is valid IPv4 address (0.0.0.0 - 255.255.255.255)
    • No invalid octets (e.g., 256.1.1.1)
    • Proper dotted-decimal format
  • Common errors: "999.999.999.999", "192.168.1", "192.168.1.1.1"

AAAA Record Validation (IPv6):

  • Format: name IN AAAA ipv6_address
  • Example: www.example.com IN AAAA 2001:db8::1
  • Checks:
    • Valid IPv6 address with proper hextet format
    • Correct compression (:: only once)
    • Hexadecimal digits only (0-9, a-f)
  • Common errors: "gggg::1", "2001:db8:::1", invalid compression

CNAME Record Validation:

  • Format: alias IN CNAME target.domain.com.
  • Example: www.example.com IN CNAME target.example.com.
  • Checks:
    • Target is valid domain name
    • Domain labels follow DNS naming rules
    • Total length < 253 characters
    • Label length < 63 characters
  • Warnings:
    • CNAME at zone apex (not allowed per RFC)
    • CNAME with other record types (violates RFC 1034)
  • Common errors: Invalid characters, labels too long, missing trailing dot

MX Record Validation:

  • Format: domain IN MX priority mailserver.domain.com.
  • Example: example.com IN MX 10 mail.example.com.
  • Checks:
    • Priority is 0-65535 (16-bit unsigned integer)
    • Mail server is valid domain name
    • Proper format: "priority hostname"
  • Best practices:
    • Lower priority = higher preference
    • Multiple MX records for redundancy
    • MX target should have A/AAAA record (not CNAME)
  • Common errors: Missing priority, invalid priority range, IP instead of hostname

TXT Record Validation:

  • Format: name IN TXT "text value"
  • Example: example.com IN TXT "v=spf1 include:_spf.google.com ~all"
  • Checks:
    • Total length < 255 characters per string
    • Multiple strings concatenated if longer
    • Proper quoting of special characters
  • Common uses:
    • SPF records: "v=spf1 ..."
    • DKIM: "v=DKIM1; k=rsa; p=..."
    • DMARC: "v=DMARC1; p=reject; ..."
    • Domain verification: "google-site-verification=..."

SRV Record Validation:

  • Format: _service._proto.name IN SRV priority weight port target
  • Example: _sip._tcp.example.com IN SRV 10 60 5060 sipserver.example.com.
  • Checks:
    • Priority: 0-65535
    • Weight: 0-65535 (load balancing)
    • Port: 1-65535
    • Target: Valid domain name or "." for unavailable service
  • Name format: _service._protocol.domain
    • Service: _http, _sip, _ldap, _xmpp, etc.
    • Protocol: _tcp or _udp
  • Common errors: Missing underscore, invalid port, wrong parameter order

Domain Name Validation Rules:

  • Label rules:
    • 1-63 characters per label
    • Start with letter or digit, end with letter or digit
    • Middle can contain hyphens
    • No consecutive dots
  • Total length: Maximum 253 characters for FQDN
  • Characters: Letters, digits, hyphens (a-z, A-Z, 0-9, -)
  • Case insensitive: Example.COM = example.com
  • Trailing dot: Indicates FQDN (example.com.)

Common Validation Errors:

  • Invalid IP format: Typos, out-of-range octets/hextets
  • Invalid domain name: Special characters, spaces, consecutive dots
  • Label too long: > 63 characters in single label
  • FQDN too long: > 253 characters total
  • Missing parameters: Incomplete MX or SRV record
  • Wrong format: IP in MX target, domain in A record

Best Practices:

  • Always validate before deploying to production
  • Use FQDN format with trailing dot for zone files
  • Test with multiple validators (dig, nslookup, online tools)
  • Document any non-standard configurations
  • Set appropriate TTL before going live
  • Keep backup of working DNS configuration