After you add a CNAME record to your domain's DNS settings, you can check the status of your change by looking up which CNAME records are currently in effect for your domain. This article will demonstrate how to check a CNAME either using a third-party web service or running DNS queries from your computer.
Check CNAME Using Free Web Service
- Open https://www.whatsmydns.net/ in a new browser tab.
- In the empty field, enter your cname (cdn.domain.com) and select CNAME from the dropdown menu.
- Select "Search"
- If the domain is propagated, a green checkmark will appear next to your CDN url (foo.bar.netdna-cdn.com) for all locations:
If the CNAME has not propagated, a red X will appear next to certain (or all) locations.
Check CNAME Using Your Computer
The application nslookup comes with most operating systems and can be used to look up name server details from your Windows, Mac, or Linux command line. To start the command line in Windows:
- Select Run from the Start menu, enter "cmd" and press enter. (On Mac or Linux, start the terminal.)
- Enter the following command:
nslookup -q=cname cdn.domain.com
This will return the following:
Server: 127.0.1.1 Address: 127.0.1.1#53 Non-authoritative answer: cdn.domain.com canonical name = foo.bar.netdna-cdn.com.
Linux distributions without the dnsutils package don’t have nslookup and similar tools, but there’s a good replacement for each.
For a replacement to nslookup, use a tool called “drill” (a “dig” clone):
$ drill www.maxcdn.com ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 46722 ;; flags: qr rd ra ; QUERY: 1, ANSWER: 2, AUTHORITY: 8, ADDITIONAL: 8 ;; QUESTION SECTION: ;; www.maxcdn.com. IN A ;; ANSWER SECTION: www.maxcdn.com. 121 IN CNAME maxfs.contentdeliverynetwork.netdna-cdn.com. maxfs.contentdeliverynetwork.netdna-cdn.com. 193 IN A 22.214.171.124 ;; AUTHORITY SECTION: netdna-cdn.com. 163539 IN NS dns4.p04.nsone.net. netdna-cdn.com. 163539 IN NS dns2.p04.nsone.net. netdna-cdn.com. 163539 IN NS ns-1716.awsdns-22.co.uk. netdna-cdn.com. 163539 IN NS ns-946.awsdns-54.net. netdna-cdn.com. 163539 IN NS ns-97.awsdns-12.com. netdna-cdn.com. 163539 IN NS ns-1326.awsdns-37.org. netdna-cdn.com. 163539 IN NS dns1.p04.nsone.net. netdna-cdn.com. 163539 IN NS dns3.p04.nsone.net. ;; ADDITIONAL SECTION: dns1.p04.nsone.net. 70799 IN A 126.96.36.199 dns2.p04.nsone.net. 82098 IN A 188.8.131.52 dns3.p04.nsone.net. 26250 IN A 184.108.40.206 dns4.p04.nsone.net. 81340 IN A 220.127.116.11 ns-97.awsdns-12.com. 137199 IN A 18.104.22.168 ns-946.awsdns-54.net. 70496 IN A 22.214.171.124 ns-1326.awsdns-37.org. 79487 IN A 126.96.36.199 ns-1716.awsdns-22.co.uk. 70496 IN A 188.8.131.52 ;; Query time: 33 msec ;; SERVER: 184.108.40.206 ;; WHEN: Mon Nov 30 16:01:07 2015 ;; MSG SIZE rcvd: 452
The relevant part of this output comes after the first two lines. Specifically, this tells us that cdn.domain.com is pointing to the canonical name foo.bar.netdna-cdn.com.
If you have any questions about troubleshooting the propagation of CNAMEs, please feel free to reach out to support. Live chat and ticket support are available 24/7.