DNS Cheatsheet

DNS record types, query tools, and troubleshooting techniques

Network6 commandsintermediate

Overview

DNS translates domain names to IP addresses using hierarchical resolution.

Why It Matters

DNS is fundamental to internet infrastructure; understanding it helps debug connectivity issues.

Essential Commands

dig example.com

Query DNS records for domain

dig +short example.com A

Return compact A record answer

dig example.com MX

Query mail exchanger records

nslookup example.com

Lookup DNS record using nslookup

host -t TXT example.com

Query TXT records

dig @1.1.1.1 example.com

Query specific DNS resolver

Quick Start

Begin by learning understand a, aaaa, cname, mx, and txt records

Key Concepts

Understand A, AAAA, CNAME, MX, and TXT records

Use nslookup and dig for DNS queries

Troubleshoot DNS resolution issues

Pro Tips

  • Combine multiple commands for powerful workflows
  • Use aliases to speed up your command entry
  • Create scripts to automate repetitive tasks

Common Pitfalls to Avoid

  • Forgetting to check the documentation for edge cases
  • Running commands without understanding their full impact
  • Not testing changes in a safe environment first

Related Resources

9 items