Avoid waiting for DNS to propagate when registering a domain

EDIT: To clarify the following tip can only be used on non active domain names. If the domain is in active use you will not be able to avoid waiting for the DNS caches to clear.

When you register a new domain name you do not need to wait 48+ hours for the DNS to "propagate". It never takes me longer the 10 minutes to get from choosing a name to an active website. I hope to show you how you can do the same in this blog post.

When registers say you have to wait for DNS to propagate you are actually waiting for a negative DNS cache to expire. When you access your site in a browser it tries to resolve your domain name into an IP. It generally sends a request to your ISP responsible for your internet connection. If the DNS or even name servers have not been set at your register yet then your ISP will cache a negative result typically for 48 hours. You will then need to wait till that cache has cleared before you will be able to get the new DNS records. It comes down to which tools you are using to check the website it functioning. If you are using your browser you are doing it wrong.

On most linux distros and on OS X you have the command line tool dig which will allow you to check all the DNS is setup correctly before trying to access the domain name in your browser. To check your website is ready to view in a browser use the following command.

dig +trace example.com

This will check the DNS recursively from the root servers until it reaches your name servers. The important part is that it will query the servers directly skipping your ISP's DNS resolvers and cache. The first time you run the command it may not complete as not all the DNS servers have the right information yet. You can keep running the command until it returns the expected results. It generally takes a register 5 - 10 minutes to setup the DNS. Once you have verified everything is setup correctly you can check the domain in your browser. Unless someone else has tried to view your new domain name from the same ISP you will be able to access your new site.

For those that do not wish to use the command line or do not have dig on their machine you can use an online service like intodns.com.

I hope this saves you the frustration of waiting 48+ hours for your new domain name to start functioning.

Categories: