{"id":13084,"date":"2024-04-29T11:42:20","date_gmt":"2024-04-29T11:42:20","guid":{"rendered":"https:\/\/www.bodhost.com\/kb\/?p=13084"},"modified":"2026-02-26T14:02:11","modified_gmt":"2026-02-26T14:02:11","slug":"how-to-test-dns-with-dig-and-nslookup","status":"publish","type":"post","link":"https:\/\/www.bodhost.com\/kb\/how-to-test-dns-with-dig-and-nslookup\/","title":{"rendered":"How to Test DNS with Dig and Nslookup"},"content":{"rendered":"<p>This article explains how to test DNS with dig and nslookup. Testing DNS with dig and nslookup involves querying DNS servers to retrieve information about domain names.<\/p>\n<p>Here is how you can execute basic DNS tests using both dig and nslookup-<\/p>\n<ol>\n<li>Using dig-\n<ol>\n<li>Basic Query-\n<pre>dig example.com<\/pre>\n<p>The above command recovers the DNS records for the domain example.com.<\/li>\n<li>Query a Specific Record Type-\n<pre>dig example.com MX<\/pre>\n<p>The above command regains the MX (Mail Exchange) records for the domain example.com.<\/li>\n<li>Query a Specific DNS Server-\n<pre>dig @8.8.8.8 example.com<\/pre>\n<p>This command demands the DNS server at IP address 8.8.8.8 for the DNS records of example.com.<\/li>\n<li>Reverse DNS Lookup-\n<pre>dig -x 8.8.8.8<\/pre>\n<p>This command performs a reverse DNS lookup for the IP address 8.8.8.8.<\/li>\n<\/ol>\n<\/li>\n<li>Using nslookup-\n<ol>\n<li>Basic Query-\n<pre>nslookup example.com<\/pre>\n<p>This command recovers the DNS records for the domain example.com.<\/li>\n<li>Query a Specific Record Type-\n<pre>nslookup -type=MX example.com<\/pre>\n<p>This command retrieves the MX records for the domain example.com.<\/li>\n<li>Query a Particular DNS Server-\n<pre>nslookup example.com 8.8.8.8<\/pre>\n<p>This command queries the DNS server at IP address 8.8.8.8 for the DNS records of example.com.<\/li>\n<li>Reverse DNS Lookup-\n<pre>nslookup 8.8.8.8<\/pre>\n<p>This command accomplishes a reverse DNS lookup for the IP address 8.8.8.8.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>This way, both dig and nslookup will offer you information about the queried domain or IP address. You will normally see information such as the IP address related to the domain, any linked mail servers (MX records), and other DNS records like TXT, CNAME, etc.<\/p>\n<p>By utilising the above-outlined commands with different options and parameters, you may troubleshoot DNS-related issues, verify DNS configurations, and gather different types of DNS data. Learn <a href=\"https:\/\/www.bodhost.com\/kb\/how-to-edit-or-manage-dns-records-in-plesk\/\" target=\"_blank\" rel=\"noopener\">How to Edit or Manage DNS Records in Plesk<\/a> with this quick guide.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article explains how to test DNS with dig and nslookup. Testing DNS with dig and nslookup involves querying DNS servers to retrieve information about domain names. Here is how&hellip;<\/p>\n<p><a href=\"https:\/\/www.bodhost.com\/kb\/how-to-test-dns-with-dig-and-nslookup\/\" class=\"more-link\">Read More<\/a><\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[875],"tags":[1522],"class_list":["post-13084","post","type-post","status-publish","format-standard","hentry","category-domain-name","tag-test-dns-with-dig-and-nslookup"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Test DNS with Dig and Nslookup<\/title>\n<meta name=\"description\" content=\"This article explains how to test DNS with dig and nslookup. Testing DNS with dig and nslookup involves querying DNS servers.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.bodhost.com\/kb\/how-to-test-dns-with-dig-and-nslookup\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Knowledge Base - bodHOST\" \/>\n<meta property=\"og:description\" content=\"This article explains how to test DNS with dig and nslookup. Testing DNS with dig and nslookup involves querying DNS servers.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bodhost.com\/kb\/how-to-test-dns-with-dig-and-nslookup\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - bodHOST\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-29T11:42:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T14:02:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2024\/04\/Test-DNS-with-Dig-and-Nslookup.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Serena\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Knowledge Base - bodHOST\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2024\/04\/Test-DNS-with-Dig-and-Nslookup.png\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Serena\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-test-dns-with-dig-and-nslookup\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-test-dns-with-dig-and-nslookup\\\/\"},\"author\":{\"name\":\"Serena\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/ffd3f118493c99471ae5bd4790a55830\"},\"headline\":\"How to Test DNS with Dig and Nslookup\",\"datePublished\":\"2024-04-29T11:42:20+00:00\",\"dateModified\":\"2026-02-26T14:02:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-test-dns-with-dig-and-nslookup\\\/\"},\"wordCount\":269,\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"keywords\":[\"Test DNS with Dig and Nslookup\"],\"articleSection\":[\"Domain Name\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-test-dns-with-dig-and-nslookup\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-test-dns-with-dig-and-nslookup\\\/\",\"name\":\"Test DNS with Dig and Nslookup\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\"},\"datePublished\":\"2024-04-29T11:42:20+00:00\",\"dateModified\":\"2026-02-26T14:02:11+00:00\",\"description\":\"This article explains how to test DNS with dig and nslookup. Testing DNS with dig and nslookup involves querying DNS servers.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-test-dns-with-dig-and-nslookup\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-test-dns-with-dig-and-nslookup\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-test-dns-with-dig-and-nslookup\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Domain Name\",\"item\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/category\\\/domain-name\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Test DNS with Dig and Nslookup\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"alternateName\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"contentUrl\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"width\":240,\"height\":240,\"caption\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/ffd3f118493c99471ae5bd4790a55830\",\"name\":\"Serena\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"caption\":\"Serena\"},\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/author\\\/seema\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Test DNS with Dig and Nslookup","description":"This article explains how to test DNS with dig and nslookup. Testing DNS with dig and nslookup involves querying DNS servers.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.bodhost.com\/kb\/how-to-test-dns-with-dig-and-nslookup\/","og_locale":"en_US","og_type":"article","og_title":"Knowledge Base - bodHOST","og_description":"This article explains how to test DNS with dig and nslookup. Testing DNS with dig and nslookup involves querying DNS servers.","og_url":"https:\/\/www.bodhost.com\/kb\/how-to-test-dns-with-dig-and-nslookup\/","og_site_name":"Knowledge Base - bodHOST","article_published_time":"2024-04-29T11:42:20+00:00","article_modified_time":"2026-02-26T14:02:11+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2024\/04\/Test-DNS-with-Dig-and-Nslookup.png","type":"image\/png"}],"author":"Serena","twitter_card":"summary_large_image","twitter_title":"Knowledge Base - bodHOST","twitter_image":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2024\/04\/Test-DNS-with-Dig-and-Nslookup.png","twitter_misc":{"Written by":"Serena","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bodhost.com\/kb\/how-to-test-dns-with-dig-and-nslookup\/#article","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-test-dns-with-dig-and-nslookup\/"},"author":{"name":"Serena","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/ffd3f118493c99471ae5bd4790a55830"},"headline":"How to Test DNS with Dig and Nslookup","datePublished":"2024-04-29T11:42:20+00:00","dateModified":"2026-02-26T14:02:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-test-dns-with-dig-and-nslookup\/"},"wordCount":269,"publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"keywords":["Test DNS with Dig and Nslookup"],"articleSection":["Domain Name"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.bodhost.com\/kb\/how-to-test-dns-with-dig-and-nslookup\/","url":"https:\/\/www.bodhost.com\/kb\/how-to-test-dns-with-dig-and-nslookup\/","name":"Test DNS with Dig and Nslookup","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/#website"},"datePublished":"2024-04-29T11:42:20+00:00","dateModified":"2026-02-26T14:02:11+00:00","description":"This article explains how to test DNS with dig and nslookup. Testing DNS with dig and nslookup involves querying DNS servers.","breadcrumb":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-test-dns-with-dig-and-nslookup\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bodhost.com\/kb\/how-to-test-dns-with-dig-and-nslookup\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.bodhost.com\/kb\/how-to-test-dns-with-dig-and-nslookup\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Domain Name","item":"https:\/\/www.bodhost.com\/kb\/category\/domain-name\/"},{"@type":"ListItem","position":2,"name":"How to Test DNS with Dig and Nslookup"}]},{"@type":"WebSite","@id":"https:\/\/www.bodhost.com\/kb\/#website","url":"https:\/\/www.bodhost.com\/kb\/","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","description":"","publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"alternateName":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bodhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.bodhost.com\/kb\/#organization","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","url":"https:\/\/www.bodhost.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","contentUrl":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","width":240,"height":240,"caption":"Web Hosting Knowledge Base | bodHOST Hosting FAQ"},"image":{"@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/ffd3f118493c99471ae5bd4790a55830","name":"Serena","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","caption":"Serena"},"url":"https:\/\/www.bodhost.com\/kb\/author\/seema\/"}]}},"_links":{"self":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/13084","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/comments?post=13084"}],"version-history":[{"count":3,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/13084\/revisions"}],"predecessor-version":[{"id":13091,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/13084\/revisions\/13091"}],"wp:attachment":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/media?parent=13084"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/categories?post=13084"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/tags?post=13084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}