How to change hosts file

  • updated
  • Answered

Since my temp URL root folder is not the same as a production site URL (it does not point to the public_html folder but one level higher), it was suggested that i change my hosts file, but the tutorial does not really tell how to do that.

So, is the following change to my hosts file look correct? (I put a few Xs in place of a few numbers)

Of course, I also have many root level designators in AJAX calls within my site code (and in hrefs as well), would they be likewise affected by a hosts file change?

I guess I am just confused as to exactly what to put in the hosts file, I did get the IP address from cPanel and the url in the line is what I want to become the root folder for all references in my css and html.

Hello Talentville, The information you would put in your host file would be the following. You would then go to your domain like normal but the host file modification "tricks" your computer to believing the domain goes to the IP you provided. Best Regards, TJ Edens