Most of the top class operating systems like Windows, OSX, Linux, etc comes with a set of DNS tools that can be used to fetch DNS records of a particular IP or domain names.
Most of these tools are usually used for checking and analysing DNS records. You can person DNS lookups via your normal DNS server or a specific DNS server based on your query. You can also flush your DNS, change your DNS server while fetching DNS records and much more.
Following are some useful DNS tools which can come handy if you’re using the Internet quite frequently.
Most famous command in Windows is
nslookup command which has a certain set of parameters that allows you to do specific things. One of the most useful command with this is getting A record which is IP address behind a specific hostname (or domain name). You can perform this query by running
nslookup followed by hostname or domain name you want to fetch record of, eg.
Sometimes, it is quite useful to also query the records routing to alternate DNS server to check if that DNS server is returning the correct results as per your expectations or not. To perform an alternate name server you simply add another parameter after your hostname or domain name, eg.
nslookup checkdns.in dns.google
You can also get other records like MX, NS, CNAME, etc via nslookup, to do that, follow below steps
- Open Command Prompt (cmd)
set q=MX(to get MX record) OR
set q=CNAME(to get CNAME record) OR something else that you want
- Now put your domain name and hit
OSX and Linux
Since, both OSX and Linux are based on UNIX, they share the same commands and tools for Terminal (Command Prompt for OSX and Linux).
Here you can use
dig command to get the records. To get the A record, type
dig followed by the hostname or domain name, eg.
If you want to provide alternate server, you can type
dig followed by @ sign and your DNS server address and then hostname or domain name, eg.
dig @dns.google checkdns.in
You can also get specific DNS records like MX, NS, CNAME, etc, simply by adding one more parameter to command, eg.
dig checkdns.in MX