dns,

nslookup and CNAMEs

Apr 21, 2023 · 1 min read · Post a comment

nslookup is a CLI, utility tool that is used to query the Domain Name System (DNS) to obtain domain name or IP address info. Mostly used for testing DNS propagation, whenever there is a DNS migration.

Prerequisites

  • nslookup

Solution

If you want to test a DNS A record, is pretty simple:

nslookup devcoops.com

Example output:

Server:		217.16.82.92
Address:	217.16.82.92#53

Non-authoritative answer:
Name:	devcoops.com
Address: 188.114.96.12
Name:	devcoops.com
Address: 188.114.97.12

However, if you want to check for any CNAMEs, add the parameter / flag -type=CNAME. In this case:

nslookup -type=CNAME devcoops.com

Example output:

Server:		217.16.82.92
Address:	217.16.82.92#53

Non-authoritative answer:
*** Can't find devcoops.com: No answer

Authoritative answers can be found from:
devcoops.com
	origin = elle.ns.cloudflare.com
	mail addr = dns.cloudflare.com
	serial = 2305395170
	refresh = 10000
	retry = 2400
	expire = 604800
	minimum = 3600

Conclusion

In case nothing works, feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.