TechSpot

Edit HOSTS file to Redirect to a URL?

By Deviouz
Nov 12, 2009
  1. I know how to edit the hosts file to make a connection to a website point to a specified IP address like :
    127.0.0.1 www.abc.com

    but is there any way to edit the hosts file to make a connection to www.abc.com instead go to www.nbc.com..??
    Like:
    www.nbc.com www.abc.com

    or is there something else that needs to be done to make something like this happen..??
     
  2. kimsland

    kimsland Ex-TechSpotter Posts: 14,524

    Yes

    IP address then sitename

    ie

    74.125.67.100 techspot.com

    Will redirect Google.com to TechSpot.com :D
    Edit: Wait, I think I got that the wrong way around, anyway you get the point
    Edit2 Doh. I did get it the wrong way around (I just checked) The above will make http://techspot.com/ go to Google.com


    You can find all IPs of Websites here: http://www.selfseo.com/find_ip_address_of_a_website.php
    There's a few of these sites, I just chose one at random ;)

    Edit:
    Google updates (changes) its IP often, so the above example may not work always
     
  3. Deviouz

    Deviouz TS Rookie Topic Starter Posts: 70

    like i said i already know how to do that part...
    what im asking is to have it redirect to like a specified URL instead of an IP address...!!!
     
  4. kimsland

    kimsland Ex-TechSpotter Posts: 14,524

    What?

    Thats what I just did above
    The User does not need to type in an IP or anything

    If they type in: http://techspot.com/ it will then go to Google


    YOU on the other hand, Must find the IP address of the site that you are redirecting to


    Edit:
    By the way, after you edit and save the Hosts file
    You will need to run CCleaner, before opening your browser
     
Topic Status:
Not open for further replies.

Similar Topics

Add New Comment

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...