Last updated: 5 April 2021

There are various tools you can use to check a domain’s DNS records. In this article I look at cPanel’s Track DNS feature, a couple of online tools as well as the more advanced dig utility.

Checking DNS via cPanel

If your hosting package comes with the cPanel control panel then you can get basic information via the Track DNS option.

cPanel's 'Track DNS' tool, which uses the dig utility to retrieve DNS records for a domain.
Image: checking the DNS for the domain

The above image shows a search for the domain The most important information is listed at the top: the domain’s A record points to and there are two MX records.

The zone information section provides more detailed information. The information is the output of a dig command, which I will discuss shortly. First, though, let’s look at some other online tools.

Checking DNS online

G Suite Toolbox

To get information about DNS resource records you can use online tools such as the G Suite Toolbox. You can simply enter the domain you want to query and select the DNS record you are interested in. For instance, the NS tab gives you a domain’s name servers. You can view all DNS records for a domain by selecting the ANY tab.

Domain Diagnosis

Another useful website is Apart from information about a domain’s DNS the website also gives you information about the domain registration, the server that is running the website and the SSL certificate for the domain.

Historical DNS records

There are also websites dedicated to keeping track of historical DNS records. This can be useful if you want to revert DNS records but can’t remember the old values. Unfortunately, many of these websites are no longer free to use.

Using dig

The online tools mentioned above probably give you all the information you need. However, if you are looking for a more advanced tool then you may want to try the dig utility. The utility is installed on OSX and many Linux distributions by default and can also be used on Windows.

To query a DNS record you can run a command like dig A. This returns the A record for the domain

$ dig A

; <> DiG 9.11.8-RedHat-9.11.8-1.fc30 <> A
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28917
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

; EDNS: version: 0, flags:; udp: 1452
;			IN	A


;; Query time: 19 msec
;; WHEN: Mon Aug 12 22:02:56 BST 2019
;; MSG SIZE  rcvd: 58

As you can see, dig returns much more than just the A record! I won’t discuss all the details (you can read the manual). Instead, I will give you few pointers to get you going.

Dig options

There are quite a few options that change dig’s behaviour. One useful option is +short. This option limits the output to just the answer to question:

dig A +short

Reverse lookups

Instead of finding the IP address for a domain name you can also do the reverse by adding the -x option. This can be a quick way to find the server name for an IP address:

dig -x +short

The above output shows that the IP address points to our Strawberry server.

Querying specific name server

All the DNS queries we have seen so far follow the same logic: the tool looks up the name servers for the domain name and then asks the name servers for authoritative information about a specific DNS record. Usually that is exactly what you want, but sometimes you may want to check the DNS records for a domain in another DNS zone.

For instance, let’s say you are migrating to our Strawberry server. You have moved the website and are ready to change the name servers to and However, before you do so you quickly want to check if the MX records in the new DNS zone are correct. To do so you can first check the current MX records:

dig MX +short

To check what MX records have been set up on the Strawberry server you can use the @ option to query the new name servers directly:

dig MX +short

Oops! We better change the MX records on the new server to make sure that emails will still be routed to G Suite!