ANS Documentation

Improve This Doc
  • Cloud
  • Domains and DNS management
  • Backup and High Availability
  • eCommerce Stacks
  • Security
  • Email
  • Monitoring and usage management
  • Networking
  • Operating systems
    • Linux
    • VMware ESXi
    • Windows
      • Active Directory
      • Common Issues
      • Exchange
      • FTP
      • IIS
      • MSSQL
      • Networking
      • TLS 1.2 in PowerShell
      • RDP
      • Windows Server 2016
      • SSL/TLS and Schannel
      • Windows Administration
  • Webcelerator
  • MyUKFast
  • Home >
  • Operating systems >
  • Windows >
  • Common Issues >
  • Testing Websites

Testing Websites¶

The easiest way to preview your website before making changes to DNS is through the modification of your hosts file on your PC/Server.

The hosts file is a computer file used by an operating system to map hostnames to IP addresses and can be used to bypass DNS.

The hosts file is located in C:\Windows\System32\Drivers\etc\hosts. You need to be an administrator to update this file. Right-click on Notepad and click “Open as Administrator”, then browse to the file and open it.

The formatting for the hosts file looks like this:

127.0.0.1       domain.com
::1             domain.com

Where the IP address on the left is the IP to resolve to and the entry on the right is the domain in question. In this instance with the entries above, when browsing to domain.com your machine would automatically direct you to domain.com hosted on 127.0.0.1.

On Linux and macOS the file is located in /etc/hosts, and it is in the same format as above.

You can test your hosts file is working by running a ping against the domain in question.

Next Article > Cleaning the WBEM Repository

  • Useful Links
  • SMB
  • Enterprise
  • Channel
  • Public Sector
  • ANS Data Centres
  • About ANS
  • Careers
  • Blog
  • Get in touch
  •  
  • Sales 0800 458 4545
  • Support 0800 230 0032
  • Get in touch

© ANS Group Limited | Terms and Conditions | Corporate Guidance | Sitemap
ANS Group Limited, registered in England and Wales, company registration number 03176761, registered office 1 Archway, Birley Fields, Manchester M15 5QJ