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?
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:
At prompt type:
If it resolves to what you expected then it works. It should give you something like:
It may still take a while to propagate to the rest of the internet, that's out of your control.
Using dig:
You should see something like:
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.
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.
While the other answers are pretty good, remember that what's propagated to you may not be propagated to me. rather than using DIG or NSlookup and spending an hour checking DNS servers around the world, I usually use http://www.whatsmydns.net/ to see how the propagation is going.
The easiest way to make sure your authoritative DNS servers in your delegation path are answering correctly is to use
dig +trace
:This will follow the delegations to the nameservers authoritative for your query. The last answer is normally the one you are most concerned about, but the trace is helpful in that it will show who is answering for each delegation. If you are changing nameservers, though, this can be very useful.
Keep in mind that trace will query the authoritative servers directly, so there is no caching. This is the best indication that the answers are being returned as expected, but it is not a good indication of what end-users might experience. However, since you do not often have control over other peoples' caching nameservers anyway (beyond having the foresight to lower your TTL, wait the original TTL, making the change, then restoring the TTL), it's not usually worth checking after the fact.
Try check-host.net:
http://check-host.net/check-dns?host=example.com%20
The site lets you perform DNS queries through multiple public DNS servers in parallel. Super handy.