hosts file

Editing the hosts file can prove quite valuable when you are waiting for your domain name to “propagate” across the the world wide web. DNS propagation can take anywhere between 4-48 hours so there is a great deal of the unknown when waiting for your website to come up.

Fortunately, there is a way to “trick” your PC into thinking that the DNS has already propagated and that is by editing your hosts file.

How does DNS Work?

When you type in a web address into your web browser (Internet Explorer, Chrome, Firefox, etc.) within a split second, your computer does a quick check to determine where it needs to go to find the website you’re after. Your PC will first check you hosts file, and then your DNS which is provided by your Internet Service Provider. DNS servers are like a phone directory of website addresses – there are literally thousands of DNS servers on the internet telling users where to find websites. This is where the 4-48 hour wait time comes into affect. If you tell your DNS that your website address has changed, it needs to tell the thousands of other DNS servers across the internet which takes time. So, to circumvent the wait time, we can modify our hosts file to “trick” our PC to thinking that the DNS has been updated.

Editing the Hosts File

Follow these simple instructions to update your DNS while you wait for DNS propagation.

Open Notepad as an Adminstrator:

  1. Click Start -> All Programs -> Accessories.
  2. Right Click “Notepad” and select “Run as Administrator
Notepad Run as Administrator

Open the hosts file:

  1. Find C:\Windows\System32\drivers\etc\
  2. Select “All Files (*.*)
  3. Select and Open “hosts
Open the hosts file

Edit the hosts file:

  1. Add the server IP Address (available from web host)
  2. Add Domain Name

Save the changes:

  • Click “File
  • Click “Save
Add IP and Domain to Hosts File

And your done! Simply open a browser and type in your domain name and your website will appear as if it has already propagated! In the meantime, you can see how your propagation is going using this handy tool: Simply type in your domain name and it will tell you what the rest of the world sees.