Sometimes you may have an issue on your domain name but you do not know where is the problem. This is a full tutorial to check the whole chain of your domain DNS.
Check DNS in Terminal
If you are using Mac, you can open Terminal app. If you are using Windows, you can open command prompt.
Domain name
tld means Top Level Domain, that is, .com, .net, .org, .co.uk, .gov.au, etc. This is manage by the large company that you cannot create one your own.
domain is the name that based on Top Level Domain, that is, example.com, un.org, gov.au, etc.
hostname is the subdomain based on the domain name, that is www.example.com, my.gov.au, etc. This is the URL that we put in the address bar of the browser to see the webpage.
Whois
If you want to check the domain owner info, the command is called whois. It will display all information about your domain.
whois domain_name.tld
To check the status only, type
whois domain_name.tld | grep 'status'
To check where do you buy the domain, type
whois domain_name.tld |grep 'Registrar'
To check the name server of your domain parked only, you can check the name server status.
whois domain_name.tld |grep 'Name Server'
nslookup
If you want to check global DNS status for your domain, there are many ways to do it.
nslookup
Check your domain name.
domain_name.tld
Remember domain_name.tld is different from www.domain_name.tld
hostname.domain_name.tld
DNS server
If you want to specify the server like CloudFlare DNS or Google DNS, you can set the server name.
GOOGLE DNS SERVER
server 8.8.8.8
CLOUDFLARE DNS SERVER
server 1.1.1.1
Then type your domain again.
dig
Another command to get your domain information is
dig domain.tld
Check hostname
dig hostname.domain.tld
To check the DNS result from the specific server, type
dig hostname.domain.tld A @dns_server
Check for DNSSEC issues
dig domain_name +cd
Web Service
Those commands are very helpful but those commands are only available to check one by one, and some functions are checking your local network only. If you want to check the servers everywhere in the world, you may want to use some other websites.
Check whois
Check DNS
https://mxtoolbox.com/dnscheck.aspx