Editing Your Computers Hosts File

Discussion in 'Kickassd Specific Guides' started by Chuck, Nov 22, 2017.

  1. Chuck

    Chuck Administrator
    Staff Member Grep What?

    May 17, 2017
    Likes Received:
    Editing your computers hosts file is quick, easy, and allows you to force your computer to see your website the server of your choice using the normal URL. You override your local DNS by doing this. This is a much cleaner and reliable way of previewing your site then using a sub-domain or temporary URL, especially for a CMS that will partially or even completely break if it does not get the URL it expects.

    Windows 8 And 10

    Open notepad as an administrator:

    In Notepad got to File > Open. At bottom right Text Documents (*.txt) is selected by default, change that to All Files. Now navigate to your hosts file and open it:

    You will need your server IP for the next part which you can find inside your cPanel > right menu > Server Information.

    You will want to add typically a line for yourdomain.com and www.yourdomain.com, of course replacing yourdomain.com with your domain. Also replace with the server IP. It should look something like:

    Once you save this open a fresh browser window and go to your site, you should be viewing it on the Kickassd servers.

    Verifying Your Sites Server

    This is quick and easy to do with your browser. Right click on your website page > Inspect Element > Network.
    Note: This example is from Chrome, Firefox is very close to the same.

    Now press F5 to refresh the page and you will see a bunch of items listed, click the first one in the list then click Headers.

    The remote address should be your Kickassd server IP.

    Editing Hosts File On Mac And Linux

    This is much simpler :)

    sudo nano /etc/hosts
    The lines to add will be in the same format as in the above screenshot for the Windows part of the guide. Verify your server is also the same as above.
    #1 Chuck, Nov 22, 2017
    Last edited: Nov 24, 2017

Share This Page