problem with the "hosts" file in windows xp..kindly help!

Discussion in 'Software' started by celebration.of.being, Oct 17, 2004.

  1. celebration.of.being

    celebration.of.being Private First Class

    I am running windows xp pro and recently came to know about the file "hosts" which is located at c:\windows\system32\drivers\etc (with xp installed in c drive). What i want to know is..like when the internet browser wants to resolve the host name we enter..whether it looks into hosts file first or directly goes to DNS (in case of windows XP)....In the host file i made this modification by entering the ip address for a site as 127.0.0.1, ideally the web page shud not have opened (in case the browser first looked at the hosts file).....but it opens up...is it that the broser directly goes to DNS instead of looking into the file..
    Cud anybody out there plz help me out on this matter....i wud be highly thankful....bye
     
  2. snakefoot

    snakefoot Sergeant Major

    What is the URL of the website ? (If it is a subnet then it will not work, ex. forums.majorgeeks.com)
     
  3. celebration.of.being

    celebration.of.being Private First Class

    Okie that means with subnets this doesnt work...anyways, I tried it with yahoo.com ..n rediff.com. Thanx a lot for ur kind attention..bye
     
  4. celebration.of.being

    celebration.of.being Private First Class

    Hey somebody got to help this newbie...plzz!
     
  5. snakefoot

    snakefoot Sergeant Major

    Just tried the hosts file thing on my Win2k, and subnets works just fine, so much for my knowledge :)

    But I did notice that if one wanted to block a domain, then just:
    Wouldn't do it, instead one had to specify all nets:

     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds