How can I test the site on my hosting without pointing the domain name to it? (Hosts file - Windows)

How can I test the site on my hosting without pointing the domain name to it? (Hosts file - Windows)

You have probably asked yourself: How can I test my new website while keeping the old website online?

You can do that easily if you edit your HOSTS file.

Normally, when you enter a domain name in your browser, it will look for the name servers of that domain name to learn where your website is hosted. You can indicate that in the HOSTS file, preventing the browser from doing that check.

That way, even if the domain name is not registered yet, and has no name servers, or its name servers are incorrect because it is expired, or for any other reason, you can still visualize it from your browser.

This tutorial only applies for Windows users. Click on the link If you would like to edit your HOSTS file in Mac

Follow the steps below to open and edit your HOSTS in file in administrator mode using Notepad.

  1. Click the Windows Start button and type ‘NotePad’ to locate the shortcut to the notepad program. Open your HOSTS file in admin mode.

    1. Locate your Notepad, right-click on it and select Run as Administrator.


      Run as Administrator

    2. As an Administrator, open the following file: C:\Windows\System32\Drivers\etc\hosts


      All files


  2. Edit your HOSTS file. For each domain name you need a single line, which consists of the IP followed by all hosts you want to direct to that IP address, divided by a single space. Check the example bellow:


  3. Save

    1. Click on File > Save to save your changes


    2. Now click on File > Exit to exit the file safely


  4. Test

SSD Hosting: your website or web store up to 20 times faster!

  • 24/7 free support and domain name
  • Money back guarantee
  • User-friendly control panel
More information?

Couldn't find a solution?

Our team is available 24/7 to provide you with free assistance. Feel free to contact our collaborators, free of charge, via e-mail or telephone.


+32 (0)9 218 79 79