Testing your website before pointing your live domain with the Windows Hosts file.

The Windows Hosts file will allow your local machine to browse sites as if the live domain was already pointed at a specific server IP address.
You can use this to test your website here before pointing your live domain publicly.

You can of course use our preview URL system to test your website (see the link below). 
https://portal.winserve.co.uk/index.php?rp=/knowledgebase/17/How-can-i-preview-my-website-without-pointing-my-domain-at-your-network.html#

However sometimes you may need to use the real domain for testing due to URL Rewriting, Routing, Redirects, SSL or many other reasons.

To perform a hosts file edit:

  • Press the Windows key.
  • Type "Notepad".
  • In the search results, right-click Notepad and select Run as administrator.
  • From Notepad, open the following file: c:\Windows\System32\Drivers\etc\hosts.
  • Add the IP of the new server followed by a space and the domain name / subdomain
  • for example:
  • 242.142.285.143    winserve.co.uk
  • 242.142.285.143    www.winserve.co.uk
  • Click File > Save to save your changes.
  • You can then go to your site in your browser to test it. Once you have tested the site, remove the lines from your host file and save it.
  • We recommend using an incognito/private browsing tab as content caching can give inaccurate results when testing websites.
  • hosts file, preview, testing, website
  • 26 Users Found This Useful
Was this answer helpful?

Related Articles

How do i change the Nameserver Records of a domain registered with Winserve?

To change the Nameserver records of a domain registered with us please follow the instructions...

How do domain names and DNS work?

The Domain Name System (DNS) helps users to find their way around the Internet. Every computer on...

How to transfer the owner/registrant of a UK domain name.

Although you can update the contact details of a UK domain name on our...

Can I buy a domain name without hosting?

It is not mandatory to purchase a hosting plan with new domain registrations so feel free to...

Changing your IPS Tag directly through Nominet

If you cannot get your current registrar to change the IPS Tag of your domains to our tag then...