DNS (Domain Name System) is a fundamental facilitator of several networking technologies such as mail servers, Internet browsing, and streaming services e.g. Netflix and Spotify, among others.
It works on a special computer called a DNS server – which keeps a database record of several public IP addresses along with their corresponding hostnames in order for it to resolve or translate hostnames to IP addresses upon user request.
This happens so that we would not need to bother ourselves with remembering the IP addresses of the different websites we visit.
While there are several things we can discuss on DNS servers such as redirection and malware attack prevention, our focus today is on how to find out your very own dns server IP address.
There are several ways to check for it depending on the Operating System that you’re running but Linux, BSD, and Unix-like systems all share the same method so let’s begin with them.
How to Find My DNS Server IP Address
$ cat /etc/resolv.conf OR $ less /etc/resolv.conf
2. Another way is to use the following grep command.
$ grep "nameserver" /etc/resolv.conf nameserver 126.96.36.199
Here, nameserver 188.8.131.52 is a name server IP address in what is called the dot notation – the format that applications on your workstation use for DNS routing.
How to Find My Website DNS Server IP Address
3. To find out a website DNS Server IP address, you can use the following dig command.
$ dig tecmint.com
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.68.rc1.el6_10.1 <<>> tecmint.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30412 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;tecmint.com. IN A ;; ANSWER SECTION: tecmint.com. 21 IN A 184.108.40.206 tecmint.com. 21 IN A 220.127.116.11 ;; Query time: 0 msec ;; SERVER: 18.104.22.168#53(22.214.171.124) ;; WHEN: Mon Jun 24 07:25:42 2019 ;; MSG SIZE rcvd: 61
Easy right? Perhaps we’ll talk about primary and secondary DNS Server addresses next time. Till then, feel free to share and drop your comments/suggestions in the discussion section below.