Access Denied: How to edit hosts file in Windows 8

Written by: Oliver Krautscheid - Published: Tuesday, December 6th, 2011 - Comments

In this tutorial we explain how to edit hosts file without the permissions issue e. g. Access Denied

edit hosts file Windows 8

Edit hosts file in Windows 8

The Hosts File in Windows is used to map hostsnames to IP addresses. Hosts file needs administrator privileges for editing. You can follow the steps mentioned below to edit it easily.

1. In the Metro Start Menu, click on the lower left corner. The Start menu pops up. Click on Search.

metro search

2. In the Apps Search Box, type notepad. The Notepad icon will appear on left.


3. Right click on the Notepad icon. A tick will appear over it and a bar will pop up from the bottom. Click on Advanced and select Run as Administrator.

advanced administrator

4. The Notepad will launch with administrator privileges. Click on File –> Open.


5. Browse to C:\Windows\System32\drivers\etc and select hosts file.

host file

6. You can now edit the hosts file.

host file

If your hosts file gets messed up you can have it repaired by copying and pasting the default file content available here.

Related Posts Plugin for WordPress, Blogger...

Access Denied: How to edit hosts file in Windows 8 5/5 (100%) 10 votes

Written by: Oliver Krautscheid
I am the founder of and In my free time I love blogging about everything digital. I have a passion for programming, design, domains, stocks and internet marketing .. and alternative rock! So, let's rock!

Learn More About.Me

Follow me on Twitter for daily updates: Twitter Follower

Contact The Author: Get Free Help.png

- Was it helpful? Please bookmark it and spread the word

delicious   facebook   google   twitter  

Subscribe via Email:
Here at we make the new mobile OS a little easier to understand, plus we bring you the latest and best desktop themes that you will find anywhere. If you ever need help with Windows 8, simply contact us at

9 Responses

  1. Roland said:

    Even editing the hosts file with admin rights doesn’t work for me. I still get the message that the file is protected. “Access denied”
    Platform: Windows 8 Pro 64 Bit

  2. kwack said:

    idem as Roland
    Doesn’t work, still access denied !
    damn I hate this windows ><

    Platform: Windows 8 64 Bit

  3. Chris said:

    Yeah, these instructions are incomplete. This shows you how to open and edit the hosts file, but not how to save it.

  4. Gass said:

    Hey this worked for me ! but **(NOTE)** after opening the etc. folder at C:\Windows\System32\drivers\etc . Nothing was showing till I choose (All Files) from the dropdown box. Then it shows all files there (and hosts file also).
    The way I used to edit the host file was copy it to my desktop and use notepad to edit it then copy it back to C:\Windows\System32\drivers\etc and over write the original file.
    Thanks Gass.

  5. Gass said:

    Hey and my system is WINDOWS 8 PRO-64 BIT.

  6. Gass said:

    Roland I have Platform: Windows 8 Pro 64 Bit and while I had no problem adding an edit to my host file with the method above. I did have a problem trying to remove that edit. Windows Defender in Win8 protects your host file and if you have installed a Internet security suit then chances are Windows Defender is already turned off. Just disable your Internet security suit and try the editing. This worked for me.

  7. zero said:

    Right click on etc folder -> properties -> remove read only tick. open notepad as admşnşstrator , change , save.

  8. 3JIblgEHb said:

    Linux LiveCD – best solution

  9. Judd said:

    GASS has it right. As soon as I disable Defenders Realtime Protection I was able to edit the file correctly. Thanks Gass!


Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>