Hosts File Edit

Categories

How Do I Do the Host File Trick to View My Website?

Use the following instructions if you’re running Windows 10 or Windows 8:
See Rackspace doc for other OS: (https://support.rackspace.com/how-to/modify-your-hosts-file/)

  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.
    At the bottom enter text for IP address. Make sure to include www and non-www.
  6. Example see video above:
    37.60.227.111 yourwebsite.com 
    37.60.227.111 www.yourwebsite.com 
  7. Select File > Save to save your changes. IMPORTANT: be sure to save as a host file, NOT as a text (.txt) file
  8. Click on “host” (the original file).
  9. Restart any currently open browsers
  10. Flush your DNS Cache
    You may also want to flush your DNS cache. In Windows, go to Start/Windows button in the bottom left of your Task Bar, and in the search field type “cmd” and hit the Enter key on your keyboard.
    Type the following: ipconfig /flushdns
  11. Test your changes
    In your web browser you should see your site as it appears on your testing server when typing http://yourwebsite.com/ but still be able to see the site on its current web server by visiting http://www.yourwebsite.com/

YouTube Video: https://www.youtube.com/watch?v=uLWX0cC2PaI&feature=youtu.be

Request Free Consultation

Clarify goals and identify the best options.

Follow Us

Scroll to Top