What is DNS and Types of DNS Records with Commands to Query Print

  • DNS, MX, DNS records, DNS lookup tools, DNS troubleshooting, A record, CNAME, NS, query DNS commands
  • 337

What is DNS?

DNS (Domain Name System) is the protocol that translates human-readable domain names (like example.com) into IP addresses (like 192.168.1.1), enabling browsers to connect to websites. It acts like the phonebook of the Internet.

Why is DNS Important?

  • Enables users to access websites without needing IP addresses.
  • Facilitates fast, efficient routing of traffic between users and servers.
  • Essential for services like email delivery and authentication.

Types of DNS Records and Their Utilities

  • A Record: Maps a domain to an IPv4 address (e.g., example.com → 93.184.216.34).
  • AAAA Record: Maps a domain to an IPv6 address.
  • CNAME Record: Creates an alias for another domain (e.g., www.example.com → example.com).
  • MX Record: Directs email to mail servers (e.g., example.com → mail.example.com).
  • NS Record: Specifies the authoritative DNS servers for a domain.
  • TXT Record: Holds arbitrary text data for verification or security (e.g., SPF or DKIM records).
  • PTR Record: Maps an IP address back to a domain (reverse DNS lookup).
  • SOA Record: Stores essential information about a domain, including its primary name server and refresh times.

Commands to Query DNS Records

Windows

  1. Open Command Prompt (Search "cmd" and open).
  2. Run:
    nslookup example.com
  3. For a specific record type (e.g., MX):
    nslookup -query=MX example.com

macOS / Linux

  1. Open Terminal.
  2. Use the dig command:
    dig example.com
  3. Query specific records:
    dig example.com MX
  4. For reverse DNS lookup:
    dig -x 93.184.216.34

Web-Based DNS Tools

Troubleshooting Tips

  • If DNS changes are not reflected, try flushing your DNS cache using:
    ipconfig /flushdns (Windows) or sudo dscacheutil -flushcache (macOS).
  • Ensure your domain is using the correct name servers (NS Records).
  • Check propagation delays using DNSChecker.

Was this answer helpful?

« Back