[Windows] Modifying your hosts file

From time to time we may need to use a different IP for a website.  It could be for testing a new website, a website migration or to skip the DNS propagation.

 

An example on how each additionnal line should look like:

192.168.1.10 website.tld

 

**You may have to flush your DNS cache in order to make it work properly. Or, as Windows is, rebooting it will automatically flush it.

Choose your current Windows version from below list and follow each action carefully.

For Windows 10 and 8
  1. Press the Windows key.
  2. Type Notepad in the search field.
  3. In the search results, right-click Notepad and select Run as administrator.
  4. From Notepad, open the following file: c:\Windows\System32\Drivers\etc\hosts
  5. Make the necessary changes to the file.
  6. Click File > Save to save your changes.
 
For Windows 7 and Vista
  1. Click Start > All Programs > Accessories.
  2. Right-click Notepad and select Run as administrator.
  3. Click Continue on the Windows needs your permission UAC window.
  4. When Notepad opens, click File > Open.
  5. In the File name field, type C:\Windows\System32\Drivers\etc\hosts.
  6. Click Open.
  7. Make the necessary changes to the file.
  8. Click File > Save to save your changes.
 
For Windows NT, Windows 2000, and Windows XP
  1. Click Start > All Programs > Accessories > Notepad.
  2. Click File > Open.
  3. In the File name field, type C:\Windows\System32\Drivers\etc\hosts.
  4. Click Open.
  5. Make the necessary changes to the file.
  6. Click File > Save to save your changes.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

What is a nameserver?

What is a nameserver? In their simplest form, nameservers match domain names to IP addresses....

Updating Your DNS at NetworkSolutions.com

This purpose of this tutorial is to teach you how to update your DNS (Domain Name Servers)...

Updating Your DNS at DynaDot.com

This tutorial is going to teach you how to update your DNS (Domain Name Servers) settings when...

Updating Your DNS at Register.com

The purpose of this tutorial is to teach you how to update your DNS (Domain Name Servers)...

Updating Your DNS at 1and1.com

This tutorial is going to teach you how to update your DNS (Domain Name Servers) settings at...