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 you can execute basic DNS tests using both dig and nslookup-

  1. Using dig-
    1. Basic Query-
      dig example.com

      The above command recovers the DNS records for the domain example.com.

    2. Query a Specific Record Type-
      dig example.com MX

      The above command regains the MX (Mail Exchange) records for the domain example.com.

    3. Query a Specific DNS Server-
      dig @8.8.8.8 example.com

      This command demands the DNS server at IP address 8.8.8.8 for the DNS records of example.com.

    4. Reverse DNS Lookup-
      dig -x 8.8.8.8

      This command performs a reverse DNS lookup for the IP address 8.8.8.8.

  2. Using nslookup-
    1. Basic Query-
      nslookup example.com

      This command recovers the DNS records for the domain example.com.

    2. Query a Specific Record Type-
      nslookup -type=MX example.com

      This command retrieves the MX records for the domain example.com.

    3. Query a Particular DNS Server-
      nslookup example.com 8.8.8.8

      This command queries the DNS server at IP address 8.8.8.8 for the DNS records of example.com.

    4. Reverse DNS Lookup-
      nslookup 8.8.8.8

      This command accomplishes a reverse DNS lookup for the IP address 8.8.8.8.

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.

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 How to Edit or Manage DNS Records in Plesk with this quick guide.

Popular Posts You May Read

Explore more hosting insights, tips and industry updates.

How to Inspect your Website for Broken Links

This tutorial outlines the process of verifying your website for broken links, a vital task…

Steps to Share a MySQL Database in Cpanel

cPanel is one of the popular control panels. It allows the webmaster to control a…

Zikula How To- Adding a Module

If you want to add a module in Zikula then you can follow the following…