Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

Why can't I make changes to my host file when I am the administrator on this computer?

Question:

Hey, Leo, I’m attempting to add known porn sites to my host file assigning the 127.0.0.1 domain to them. However, every time I try to save the entry through Notepad, I get the message that I don’t have the authority to do that and that I should check with the administrator. Of course, that’s me and I’m already running Explorer as the administrator. So why can I not make the changes and what do I need to do so that the changes to my host file are saved and take effect?

In this excerpt from “Answercast #8, I discuss how the host file can help protect your computer and a few extra steps necessary (from Windows Vista and up) to run Notepad as administrator

Become a Patron of Ask Leo! and go ad-free!

You are not administrator… yet.

Using the host file to block certain domains is actually a very convenient way to do domain blocking at a per machine level. The host file is where your system goes to to look for the IP addresses associated with a domain name. By forcing the IP address to be 127.0.0.1, you’re saying that that domain actually resides on your machine and of course, it does not. Your machine isn’t even running a web server.

As a result, the web browser (or any other attempt to get to that domain) fails. It’s perfect for blocking porn sites or anything else that you’re interested in blocking.

Administrative access to Notepad

The host file is protected. You must have administrative privileges to run it. And, as it turns out, it’s not uncommon to think you have administrator privileges when you don’t.

I’ll point you to an article on the site: “Why does my computer say I need to be administrator when I am?

In reality, you may think you’re administrator, but you’re not.

Windows security

One of the security features introduced in Windows Vista and carried forward in Windows 7 is that even an account that has been assigned administrative privileges is not running as administrator. What you need to do in a case like this is run Notepad specifically as administrator.

What that means is that you right-click on the Notepad icon. A pop-up menu should then have something that says, “Run as administrator.” Click on that.

You’ll probably have to confirm a Windows User Access Control prompt, confirming that in fact you are running it as administrator. Once you do that, you can use “File Open” to access the host file. Make your changes and at that point, you should be able to save it without any problems.

Next –Why can’t I log into Hotmail even though I remember my password?

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

3 comments on “Why can't I make changes to my host file when I am the administrator on this computer?”

  1. Leo, just tried your Administrator tip in Notepad, but it didn’t work. After I checked the Administrator icon and added a password it rejected it. Any ideas?

    “Added” a password? I have no idea then what you actually did – there’s no need to add a password. Just right click on the notepad icon, click on Run as administrator, and you should be able to edit the hosts file.

    Leo
    13-Apr-2012
    Reply
  2. The host file is usually read only. Use your favorite method to clear it. Make your changes. Save it and then recheck the read only attributes .

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.