WebDesires

How To Modify Your HOSTS File

Modifying your HOSTS file is very useful when you want to override the DNS for a domain on a particular machine, allowing you to test your site before you change the real DNS settings on your domain – equally this is useful if you are waiting for DNS propagation and would like to access the site on your new hosting provider before propagation has occured.

 

Find your web host IP on WebDesires

If you are hosting with WebDesires you can follow the steps below to discover the correct IP for your hosting account, if not please skip this step.

You will need to know a few things before you get started, firstly find out what the IP for your new hosting service will be:

  1. login to our portal (portal.webdesires.co.uk).
  2. Under “Services” click on “All Services”:
  3. On the “service” page click on the detailed link button:
    portal - service page
  4. On the “service details page” you will find your hosting account IP address:

 

Modifying your HOSTS to point a domain to an IP

Once you have the IP address follow the steps below to modify your HOSTS file under Windows.

  1. Open “File Explorer” or click “Start” and type:
    C:\Windows\System32\drivers\etc
  2. Right-click on the “hosts” file and click “properties”:
    Right-click Properties
  3. In the “Properties” dialog click on “Security” and click “Edit”  – for each”Group / Username” you need to make sure “Full control” is ticked:
    Edit hosts file permissions
  4. Click “ok” making sure all settings saved, you may need to enter you administrator password.
  5. Now Right-click “hosts” and select “Open With…”, find notepad and click ok.
  6. You now need to add the following line to the very bottom of your hosts file, make sure you replace 184.34.1.1 with the IP address above and mydomain.com with the full domain name you wish to “re-route”.
    windows hosts file
  7. Save the file and exit, load the url in your browser and it will now point to your new hosting provider!

Simple 🙂

Author: Dean Williams

Professional PHP Web Developer with expertise in OpenCart Web Development, WordPress Web Development, Bespoke Systems - also a seasoned Linux Server Administrator.


Leave a Reply

Your email address will not be published. Required fields are marked *