How to test if DNS information has propagated?
I set up a new DNS entry for one of my subdomains (I haven't set up any Apache virtual hosts or anything like that yet). How can I check that the DNS information has propagated?
I assumed that I could simply ping my.subdomain.com
and assume that if it could resolve, it would show the IP address I specified in the A record. However, I don't know if I am assuming correctly. What is the best way to check this information?
Solution 1:
You can use dig or nslookup, say your (or your provider's if you don't run your own) nameserver is ns1.example.com.
Using nslookup:
nslookup - ns1.example.com
At prompt type:
my.example.com
If it resolves to what you expected then it works. It should give you something like:
Name: example.com
Address: 192.0.43.10
It may still take a while to propagate to the rest of the internet, that's out of your control.
Using dig:
[email protected] my.example.com
You should see something like:
;; ANSWER SECTION:
example.com. 172800 IN A 192.0.43.10
Just using ping may give you an idea, but only when it has propagated (cached by remote nameservers may be a better way to describe it) and your local dns cache may need to be flushed. Although in your case this does not apply because this is a new record. In that case it should be available immediately. The above way is more precise in giving you an idea as opposed to just pinging it.
If you use windows then the commands and syntax may differ slightly, but are pretty similar.
Solution 2:
You can't test for DNS record propagation because DNS propagation doesn't occur. What you can test for is whether or not a DNS client or server has a particular DNS record cached.
Since this is a new DNS record, no caching can have occured. Assuming that your name servers are correctly registered at the parent servers and that your name servers are working correctly, this DNS record should be available immediately to any and every DNS client or server.