This article explains how to check where your Nameservers and A records are hosted. For an overview of DNS, view the following article.
Using online tools to check your DNS
There are many websites available for you to check your DNS. For example.
General DNS record lookups
- Centralops.net – Various DNS tests
- Network-tools.com – Various DNS tests
- Multiple record lookup – Easily specify from a range of records you wish to lookup
- Nameserver lookup – Used to check details of nameserver records
DNS propagation tests
If you just updated your DNS, use the following tool to check what locations it has updated online.
- whatsmydns.net – Used to check if your DNS records have propagated in different locations
Checking your site's DNS via SSH
The following lists several commands you can run to check your site's DNS values. To run these commands, you must use an SSH terminal. View the SSH overview article for details.
This command checks where your site's Nameservers are currently hosted. The +short option simplifies the output so you only see the Nameservers without additional information.
[server]$ dig ns example.com +short ns2.dreamhost.com. ns1.dreamhost.com. ns3.dreamhost.com.
Checking A records
This checks where the A records (IP addresses) of your site are hosted.
[server]$ dig example.com +short 18.104.22.168 [server]$ dig www.example.com +short 22.214.171.124
You can then run the host command to check where that IP is hosted from.
[server]$ host 126.96.36.199 188.8.131.52.in-addr.arpa domain name pointer apache2-emu.tool.dreamhost.com.
The output of this is backwards. For example, all the way to the right shows that the IP is hosted at 'dreamhost.com'.
To the left is the server name at DreamHost. This shows it's hosted on the DreamHost server named 'tool'.
To the left of that is the specific apache instance the site is on called 'apache2-emu'.