Easy Guide On Modifying Your Hosts File

How To, Web Hosting

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.

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)


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.


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:WindowsSystem32Driversetchosts.
  • 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:WindowsSystem32Driversetchosts.
  • 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



Share Article

Related Articles

The Ultimate Beginners Guide To cPanel

If you are about to set up your own website for the first time, then in all probability you will definitely turn to cPanel…

Read Article

Brief Guide On How To Sell Your Website

Think of websites as digital real estate that you have built painstakingly, with endless time and effort. Just like traditional real estate, quality websites…

Read Article

How To Create Awesome Animated GIFs

Animated GIFs may not be a new digital trend as they have been around since 1987, but they are on the rise as they…

Read Article
[cdata[ var theForm = document.forms['previewForm']
[cdata[ var theForm = document.forms['previewForm']