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).
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.