How to edit hosts file

Some sites cannot be tested properly using the Preview link due to limitations or restrictions within the website code. To test the site prior to making it live you can edit the hosts file in your Windows PC. This will simulate the site being live only on this PC.

Before you begin, you will need:

To edit the hosts file:
  1. Find Notepad (by default this is located in Start > All Programs > Accessories) and right-click it > Run as administrator
  2. When prompted "Do you want to allow the following program to make changes to this computer" click Yes
  3. Once Notepad opens click File > Open
  4. In the File name field enter "%systemroot%\system32\drivers\etc\hosts" > click Open
  5. Scroll to bottom of the document and add the following two new lines:
    [IP of the web site] domain.tld
    [IP of the web site] www.domain.tld
  6. Click File > Save
  7. Locate Command Prompt (by default this is located in Start > All Programs > Accessories) and right-click it > Run as administrator
  8. When prompted "Do you want to allow the following program to make changes to this computer" click Yes
  9. Once Command Prompt opens enter "ipconfig /flushdns" without quotes and press Enter
  10. Open a new web browser window (simply opening a new tab in a browser already opened may not suffice)
  11. Test your site by navigating to http://www.domain.tld

Important: It's recommended that you verify you are testing the correct site by looking for content or design changes that would only exist on the new site being tested.


Once you're done testing and to undo the changes, repeat all steps however in step 5 remove the two lines that were added.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

What are your name servers?

Action Global Cloud name servers are: Primary: ns1.wsigenesis.com [35.194.22.136]Secondary:...

What is a domain alias?

Domain aliases allow more than one domain name to access the same website. Domain alias will...

What is a 301 redirect?

301 redirects allow more than one domain name to access the same website. 301 redirect will...

Price list

1. Log into your Action Global Cloud Billing Portal:...

Technical support details

Technical support can be reached via ticketing system. Please refer to KB articles on how to...