Why Does dig Command Return No DNS Records? Troubleshooting Guide for Developers


2 views


When you run a basic dig command like:

dig socialimpactportfolio.com

You might expect to see A records in the ANSWER section, but instead get only SOA records in the AUTHORITY section. This typically indicates one of several scenarios:

  1. The domain exists but has no A records configured
  2. The domain uses a non-standard DNS configuration
  3. There are issues with the resolver you're using

1. Domain exists but has no A records:

dig example.nonexistenttld
;; ANSWER SECTION:
example.nonexistenttld. 3600 IN A 192.0.2.1

2. Using a recursive resolver that's filtering results:

dig @8.8.8.8 socialimpactportfolio.com
dig @1.1.1.1 socialimpactportfolio.com

For more comprehensive DNS checking:

1. Using host command:

host socialimpactportfolio.com
host -t ANY socialimpactportfolio.com

2. Using nslookup:

nslookup -type=any socialimpactportfolio.com

3. Online DNS tools:
- https://dnschecker.org
- https://mxtoolbox.com

1. Query specific record types:

dig socialimpactportfolio.com A
dig socialimpactportfolio.com MX
dig socialimpactportfolio.com TXT

2. Trace DNS resolution path:

dig +trace socialimpactportfolio.com

3. Check DNSSEC validation:

dig +dnssec socialimpactportfolio.com

The SOA (Start of Authority) record in your output indicates that:

dns1.name-services.com

is the primary nameserver for the domain, but no other records are published at this level. This is common for:

  • Newly registered domains
  • Domains with DNS misconfiguration
  • Parked domains
  1. Check different record types:
    dig socialimpactportfolio.com ANY
  2. Query authoritative nameservers directly:
    dig @dns1.name-services.com socialimpactportfolio.com
  3. Check DNS propagation:
    dig +short socialimpactportfolio.com @8.8.8.8
    dig +short socialimpactportfolio.com @1.1.1.1

Some ISPs and public DNS services filter records for various reasons. Test with:

dig +nocmd +nocomments +noquestion +noauthority +noadditional +nostats socialimpactportfolio.com

Compare results across different resolvers to identify filtering patterns.

For cleaner output, use:

dig +short socialimpactportfolio.com
dig +noall +answer socialimpactportfolio.com

For JSON output (requires dig 9.16+):

dig +json socialimpactportfolio.com

Here's a simple bash script to check multiple record types:

#!/bin/bash

DOMAIN="socialimpactportfolio.com"
RECORDS=("A" "AAAA" "MX" "TXT" "CNAME" "NS")

for record in "${RECORDS[@]}"; do
  echo "Checking $record records:"
  dig +short $DOMAIN $record
  echo "---------------------"
done

The TTL (Time To Live) value affects when changes become visible:

dig +ttlid socialimpactportfolio.com

If you suspect caching issues, query authoritative nameservers directly:

dig @ns1.example.com socialimpactportfolio.com


When you run a basic dig command like:

dig socialimpactportfolio.com

You might get output showing only SOA records in the AUTHORITY section, with an empty ANSWER section. This doesn't necessarily mean there are no DNS records - it just means your query didn't match what's actually configured.

Here are the most likely explanations:

  • The domain exists but has no A records (only CNAME, MX, etc.)
  • You're querying the wrong nameserver
  • The domain uses a CDN or proxy service
  • There's a caching issue with your DNS resolver

Try these more comprehensive query methods:

# Query all record types
dig socialimpactportfolio.com ANY

# Query specific record types
dig socialimpactportfolio.com A
dig socialimpactportfolio.com MX
dig socialimpactportfolio.com TXT

# Query directly against authoritative nameservers
dig @ns1.name-services.com socialimpactportfolio.com

If you want simpler output, consider these alternatives:

# Using host command
host socialimpactportfolio.com

# Using nslookup
nslookup -query=any socialimpactportfolio.com

# Using drill (from ldns)
drill socialimpactportfolio.com ANY

Let's say website.example.com isn't loading. Here's how to investigate:

# First check A records
dig website.example.com A +short

# If empty, check for CNAME
dig website.example.com CNAME +short

# Verify nameservers
dig website.example.com NS +short

# Query authoritative server directly
dig @$(dig website.example.com NS +short | head -1) website.example.com A

Remember that DNS changes can take time to propagate. If you've recently made changes, you might need to wait or explicitly query different nameservers:

# Check against multiple public DNS servers
dig @8.8.8.8 website.example.com
dig @1.1.1.1 website.example.com
dig @208.67.222.222 website.example.com