When your domain is not resolving correctly, two of the most useful tools for diagnosing DNS issues are dig (on Linux/macOS) and nslookup (on Windows). These tools let you query DNS servers directly to see how your domain is configured.

 

Why Use These Tools?

  • Verify if your domain points to the correct IP address.

  • Check if DNS propagation is complete.

  • Inspect specific DNS records (A, MX, CNAME, TXT, etc.).

  • Identify misconfigurations between your registrar and hosting provider.

 

Using Web-Based DNS Tools

If you’re not comfortable with the command line, you can use free online tools:

 

Using nslookup on Windows

  1. Open Command Prompt.

  2. Run a basic query:

    Bash
    
    nslookup example.com
    

    → Shows the IP address (A record) for the domain.

  3. Query a specific DNS server→

    Bash
    
    nslookup example.com 8.8.8.8
    


    Uses Google DNS (8.8.8.8) instead of your default resolver.

  4. Look up MX (mail) records:

    Bash
    
    nslookup
    set type=MX
    example.com
    

Using dig on Linux/macOS

  1. Open Terminal.

  2. Run a basic query:

    Bash
    
    dig example.com
    

    → Displays the A record for the domain.

  3. Query a specific DNS server:

    Bash
    
    dig @8.8.8.8 example.com
    
  4. Look up MX records:

    Bash
    
    dig example.com MX
    
  5. Look up TXT records (useful for SPF/DKIM):

    Bash
    
    dig example.com TXT
    

Interpreting Results

  • ANSWER SECTION → Shows the record returned (e.g., IP address for A record).

  • AUTHORITY SECTION → Shows which nameservers are authoritative for the domain.

  • ADDITIONAL SECTION → May include related records (like IPs of nameservers).

 
Esta resposta lhe foi útil? 0 Usuários acharam útil (0 Votos)

Powered by WHMCompleteSolution