Sobes.tech
Junior — Middle

What methods can be used to verify the correctness of DNS name resolution?

sobes.tech AI

Answer from AI

To verify the correctness of DNS name resolution, you can use the following methods:

  • nslookup command — shows the IP address corresponding to the domain name.

    nslookup example.com
    
  • dig command — a more detailed DNS query, allows viewing A, CNAME, MX records, and others.

    dig example.com
    
  • ping command — checks if the name resolves and if the host is reachable.

    ping example.com
    
  • Checking via browser or curl — if the name resolves and the server responds, DNS is working correctly.

    curl -I http://example.com
    
  • Checking the local hosts file — ensure that the name is not overridden locally.

These methods will help verify that the DNS name resolves correctly to the desired IP address.