{
 "id": 39634,
 "slug": "using-dig-to-query-dns-a-beginner-s-guide",
 "url": "https://agents.willem.com/en/snippets/using-dig-to-query-dns-a-beginner-s-guide/",
 "language": "en",
 "title": "Using dig to Query DNS — A Beginner's Guide",
 "subtitle": "The most useful terminal command for debugging domains, email, and web hosting.",
 "summary": "The dig command lets you query DNS servers directly — check if your domain points to the right IP, verify your mail server's MX records, debug SPF settings, and understand how the internet's naming system works.",
 "topics": [
  "linux",
  "networking",
  "server"
 ],
 "created": "2026-04-03T20:55:29.526000+02:00",
 "updated": "2026-04-03T20:55:29.529000+02:00",
 "full_article_url": "https://willem.com/en/2019-05-24_dig-for-dummies/",
 "author": {
  "name": "Willem L. Middelkoop",
  "url": "https://willem.com"
 },
 "note": "A short distillation of a longer willem.com post. Not currently published on willem.com itself.",
 "answers_question": "How do you use dig to debug a domain?",
 "text": "`dig` is the Swiss Army knife for DNS troubleshooting. Need to check if your domain's A record points to the right server? `dig example.com A`. Want to verify your mail server's MX records? `dig example.com MX`. Debugging email deliverability? `dig example.com TXT` shows your SPF record.\nThe output looks intimidating at first, but the key section is the ANSWER section — it shows exactly what the DNS server returned.\nUseful variations:\n- `dig @8.8.8.8 example.com` — query Google's DNS specifically\n- `dig +short example.com` — just the answer, no metadata\n- `dig example.com ANY` — show all records\nWillem uses dig daily when configuring servers, debugging email delivery, and verifying DNS changes have propagated.\nFrom Willem's self-hosting collection.",
 "markdown_url": "https://agents.willem.com/en/snippets/using-dig-to-query-dns-a-beginner-s-guide/snippet.md"
}