
DNS propagation is something that can annoyingly interfere with your development process on a website. Often times you will be developing a website using a temporary dev domain, and when it comes time to switch over to the live domain name, you end up waiting hours for DNS propagation to kick in. You are suddenly cut off from your project that you have been painstackingly working on for days, weeks, months, etc…
‘But what can you do?’ You might ask. Waiting for DNS propagation is unavoidable fact of life, isn’t it? Actually, no it’s not. You can bypass dns propagation delay in a few easy steps.
The first thing you have to do is locate your hosts file. That will depend on your operating system.
Locating Your Hosts File
The following instructions apply to Windows OS. Follow the instructions from the links above for the other operating systems.
You need to know the ip address that you want the domain name to point to. You should be able to get this information from your hosting company.
Once you locate the hosts file, open it up in notepad or whichever text editor that you use. Let’s say that your new domain is yournewdomain.com, and your new ip address is 45.22.167.489. If you want to also have the new domain work as www.yournewdomain.com, you should add the following two entries to the file:
1 2 |
45.22.167.489 www.yournewdomain.com 45.22.167.489 yournewdomain.com |
Save the file and you’re done. You will now be able to access your website at the new domain name, effective immediately. Not that these changes only apply to your local machine. Everyone else will have to wait for DNS propagation in order to reach your website via your new domain. Once DNS propagation has completed, you should remove your changes to your hosts file as they are no longer needed.