Skip to content

Backgrounds

How-to Guides

Technical References

Domains & TLS /

Managing your hosts file

Modifying your hosts file will allow you to test your website with a different domain before the global DNS system has been modified or updated. This modification only affects your own computer and will need to repeated on each device you wish to test from.

A hosts file consists of IP addresses listed against domains. For example:

192.0.66.2 example.com
192.0.66.2 wpvip.com

In the above example, example.com and wpvip.com are modified to point at 192.0.66.2. Use host with your convenience domain to look up the appropriate IP address for your application:

$ host example-com.go-vip.net
example-com.go-vip.net has address 127.0.0.1
example-com.go-vip.net has address abcd:efgh:ijkl::c000:1234

All modern operating systems make use of a hosts file, but the process for modifying the file varies slightly for each system:

Mac

A popular app for managing the hosts file among Mac users is Gas Mask.

  1. After downloading Gas Mask, open the app and locate your hosts file.
  2. Make the necessary changes to the file.
  3. Save those changes. You may be prompted for your user password.

Windows (8 & 10)

  1. Press the Windows key.
  2. Type Notepad in the search field.
  3. In the search results, right-click Notepad and select Run as administrator.
  4. From Notepad, open the following file: c:\Windows\System32\Drivers\etc\hosts .
  5. Make the necessary changes to the file and save it.

Linux

  1. Open a Terminal window.
  2. Enter the following command to open the hosts file in a text editor: sudo nano /etc/hosts. You will be prompted for your root password.
  3. Make the necessary changes to the file.
  4. Press Control-X to save.

If the changes are not reflected immediately, clear your browser cache and try visiting the site again. Remember to revert any changes you have made once you have finished testing.

Web-based host file management

  1. Go to https://hosts.cx .
  2. Input the IP address found in your VIP Dashboard for the server address, and your final domain as the website name, then hit Get my testing URL .

Note that the testing URL will display differently from your final domain URL, but it will be reflecting the site as if it were hosted with VIP. You will still be able to login to the WP Admin and view the VIP site prior to switching the DNS.

Last updated: September 05, 2021