How to: Check DNS Status of a Domain¶
In the process of administering an InterWorx server, it may be necessary to
occasionally check the status of a DNS record, either against the server or other DNS
servers. There are many websites that offer the ability to check DNS
propagation, to examples being IntoDNS and WhatsMyDNS. However, very few
services offer the wide range of options available in the dig
command.
Using the dig
command provides administrators with a powerful tool to check
and confirm DNS records for their domains. More complete documentation can be
found here: https://linux.die.net/man/1/dig or by running man dig
on a
Linux server. Below are a few examples of how to check DNS records with
dig
.
In the case where a public DNS record does not match the expected address of the record, it may be helpful to check the DNS against the InterWorx server to determine if it is showing the correct information.
Using dig
to Check DNS Records¶
Most commands follow the format below, where type
is the type of record to check (A, AAAA, CNAME, TXT, etc.),
domain
is the domain name to check, and server
is the DNS server to check
against:
dig type domain @server
The following examples use interworx.com as the domain
.
To check interworx.com’s A record using upstream DNS servers:
[root@iw7 ~]# dig a interworx.com +short 3.222.247.74 54.166.117.4 34.232.198.112
To check interworx.com’s A record using a specific DNS server. In this example, “ns1.interworx.com” is the domain of a specific nameserver. Replace this with the domain/IP address of the nameserver to check:
[root@iw7 ~]# dig a interworx.com +short @ns1.interworx.com 10.1.14.83
If more verbose output is desired, removing
+short
will provide a more full list of the record:[root@iw7 ~]# dig a interworx.com ; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.3 <<>> a interworx.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54687 ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 512 ;; QUESTION SECTION: ;interworx.com. IN A ;; ANSWER SECTION: interworx.com. 59 IN A 34.232.198.112 interworx.com. 59 IN A 54.166.117.4 interworx.com. 59 IN A 3.222.247.74 ;; Query time: 18 msec ;; SERVER: 8.8.8.8#53(8.8.8.8) ;; WHEN: Sun Feb 28 13:50:54 EST 2021 ;; MSG SIZE rcvd: 88