Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: how to set etc/hosts file in windows 7

28 Nov 2009   #11

7600.20510 x86

From an elevated command prompt, run these commands and hit enter after each. You may copy/paste them:

“%PROGRAMFILES%\Bonjour\mDNSResponder.exe” -remove

regsvr32 /u “%PROGRAMFILES%\Bonjour\mdnsNSP.dll”

Reboot and then delete the Bonjour folder in program files. Problem solved.

My System SpecsSystem Spec
29 Nov 2009   #12


Problem resolved: it has nothing to do with Bonjour.

the file hosts is saved as hosts.bak or hosts.txt by Notepad!!!!

use gvim instead.

btw, how do you turn on file extension in windows 7?

My System SpecsSystem Spec
29 Nov 2009   #13

7600.20510 x86

That's why you use save as, then change "text documents" to "all files" in notepad.

You could tell when something is wrong when it doesn't ask to overwrite the original file.

Glad it's fixed.
My System SpecsSystem Spec

14 Apr 2010   #14
Bare Foot Kid
Microsoft MVP

W 7 64-bit Ultimate

Seven Forums now has a tutorial on the subject of the Hosts File, it can be view at the link below.

Hosts File : Use in Windows 7 / Vista
My System SpecsSystem Spec

 how to set etc/hosts file in windows 7

Thread Tools

Similar help and support threads
Thread Forum
Hosts File : Use in Windows 7 / Vista
How to Access and Use the Hosts File in Vista, Windows 7, and Windows 8 This will give you the basics on how to use the Windows Hosts File, it's not very complicated but it's up to each individual to find additional information and put it to good use to suite your needs. To block a site this...
error messages with windows defender, hosts file & microsoft essential
Hi, I can't open my hosts file. i want to block websites. when i right click on the hosts file to run as administrator i get . I cant open windows defender. When i click on it i get error message i can't install microsoft essentials. this just happened recently when i had a virus or malware...
System Security
Hosts file ignored and replaced with hosts.original
Hello. I am trying to use the hosts file. However both pings and web addresses still bypass the hosts file. I noticed that there is another file in the C:\Windows\System32\drivers\etc directory called 'hosts.original'. When ever I delete this file, it reappears seconds later. I have made sure that...
General Discussion
HOSTS File - Create a "Edit HOSTS file" Shortcut
How to Create a "Edit HOSTS file" Shortcut in Windows 7 and Vista The HOSTS file is a .txt file used in Vista and Windows 7 to map hostnames to IP addresses. Your computer checks this file first to resolve any network names to its corresponding IP address before it tries to check the Internet....
HOSTS file
I setup a hosts file in windows xp in order to use my website locally using the exact domain name by editing the hosts file by adding the line: This should resolve my local ip address for the site and if apache is running, then it should load the website...
Network & Sharing

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 17:07.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App