Amit Bhawani Blog

Stay Updated!

Powered by Genesis

You are here: Home / Ultimate Guides / Access Website before Dns Propagation with Hosts File

Access Website before Dns Propagation with Hosts File

March 31, 2010 by Amit Bhawani

There would be many different reasons because of which you would plan to change your Web Hosting company, most of the cases in which it would be regular downtimes, server configuration issues, upgradation requirements, need for higher bandwidth of space, need for a VPS or may be any other issue. While transferring a blog or website would be a easy job to a new host, making sure that you can easily access the new hosting account right away would be a hard job for most users because they would have to wait from several hours to even a few days for the DNS Propogation process to complete.

The domain registrar would normally point your domain name to the web hosting DNS Server, while you setup the hosting account the Master DNS record in the Domain Name System would be setup. Hence when you visit your domain name, it will redirect to the hosting companies DNS Server through which it would find the IP address of your domain name. While this is all technical stuff to understand, in short once the hosting account and NameServers are updated, the Internet Service Provider would cache the DNS records for quicker access to different websites. Different ISP have different time frame for updating the DNS records, hence if you change the NameServers of your Domain Name the new server cannot be accessed instantly because of the cached information stored by the ISP.

Before you change your web host, you would have taken a complete backup of your website along with the data stored in public_html folder, databases etc and all of this needs to be transferred to your new hosting account and also verified that its perfectly working. Hence first of all its required to change the Name Servers of your Domain Name to the new ones. Once this is done, you will find that your browser still redirects to the old hosting account stored website and this is because of the ISP cache problem as addressed above. Now we need to tweak our computer a bit to make it recognize the new host account and access the new account and set it up. Below Img Source

How Internet Works
How Internet Works

To sort out this problem and access the new server, we need to specify the IP address of the new account at which the Domain Name is hosted in the ‘hosts’ file of our computer. Generally the hosts file is located in the following location in most Windows based computers.

System_Root_Folder\system32\drivers\etc\

Next either contact the new hosting account’s support management and find the IP address of the domain name and add it in the following way to the hosts file. Normally the hosts file won’t be opening directly, hence you need to open it through any simple text editor like Notepad and make sure you ‘Run as Administrator’ or else the system won’t allow you to edit the file and save it.

74.207.225.132 www.amitbhawani.com
74.207.225.132 amitbhawani.com

That’s it, once this process is done, you will be able to get access to your new host and restore the hosting account without being waiting for hours.

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook

Related

About

My name is Amit Bhawani and here I like to share my internet/tech experience with my online readers. You can follow me on Twitter, Facebook & Instagram at @AmitBhawani I am also the Editor-in-Chief of PhoneRadar & Master Gadgets

About Amit Bhawani

My name is Amit Bhawani and here I like to share my internet/tech experience with my online readers. You can follow me on Twitter, Facebook & Instagram at @AmitBhawani

Comments

  1. JP says

    October 6, 2010 at 11:18 am

    Nice guide. On linux systems: the file is /etc/hosts
    Also, you need to restart networking for the changes to take affect.
    This is also useful for example if the nameserver is down, etc.

Timeline

Check out Just EV Tweets by @amitbhawani

Recommended To Read

  • How to Find your WiFi Signal Strength & Dead spots in your Home – Best Apps
  • The Wuhan Corona Virus Effect in India – How to Stay Safe
  • This Blogger Lost 25Kgs with this Secret Strategy that Includes a Fitness Tracker
  • Making Money on YouTube, MCN, Useful Tools, Tips & Success Stories
  • The #JaguarPerformance Experience that was Mind Blowing