Tag Archives: windows 10

hosts file

Easy Guide On Modifying Your Hosts File

From time to time you will find it necessary to modify your hosts file, this guide will give you step by step instructions on how to perform modifications which will enable you to override any DNS for a domain or bypass DNS propagation. This is useful when you want to test your website. Modifying your hosts file causes your local machine to look at the IP you specify.modifying host file

To modify your hosts file you would typically add 2 entries so the file that contains the IP address you want your site to resolve to. (In some cases antivirus/antimalware software may need to be temporarily disabled)

Example:

xxx.xxx.xxx.xxx www.domain.com
xxx.xxx.xxx.xxx domain.com

If you would like to disable a host entry simply delete the entry and save the file or just add a # before the entry then save the file.

Example:

#xxx.xxx.xxx.xxx www.domain.com
#xxx.xxx.xxx.xxx domain.com

Editing Your Hosts File On Windows 7 and Vista

  • Click Start > All Programs > Accessories.
  • Right-click on Notepad and select Run as administrator.
  • When Notepad opens, click on File > Open.
  • In the File name field, type C:\Windows\System32\Drivers\etc\hosts.
  • Click on Open.
  • Make the necessary changes to your hosts file.
  • Click File > Save to save your changes.

 

Editing On Windows 10 and 8

  • Press the Windows key.
  • Search Notepad in your search field.
  • In the search results, right-click Notepad and select Run as administrator.
  • From Notepad, open the following file: c:\Windows\System32\Drivers\etc\hosts.
  • Make the necessary changes to your hosts file.
  • Click File > Save to save your changes.

Editing On Linux Including Mac

  • Open a terminal window.
  • Open the hosts file in a text editor (any editor will work) by typing the following line:
  • sudo nano /etc/hosts
  • Enter your domain users password.
  • Make the necessary changes to the host file.
  • Press Control-x.
  • When asked if you want to save your changes, answer Y for yes.

If you have any questions fell free to email us at support@lunarpages.com