Editing hosts file is a relatively advanced procedure, and a number of users reported “Access denied” message while trying to edit the hosts file on Windows 10. The hosts file is located in your Windows 10 installation directory, and it’s protected from unauthorized access, but if you need to edit the hosts file, you can avoid “Access denied” message by following one of our solutions. Here are some more examples of this problem:

Can’t edit hosts file Windows 10 – If you can’t edit the hosts file in Windows 10, it’s probably because you don’t have required permissions. We’ll explore that problem here Hosts file being used by another process  – This is another common issue that prevents users from editing the host file. Don’t have permission to save hosts file Windows 10 – This is the same case as the first error message.

Table of contents:

How to edit the hosts file on Windows 10 and avoid Access denied message?

  1. Run Notepad as administrator If you use Notepad as your text editor, you need to run it as administrator before you can edit the hosts file. To run Notepad as administrator and to edit the hosts file, do the following: We have to mention that this solution should work with any other text editor, so if you don’t use Notepad, just run your desired text editor as administrator and you should be able to edit hosts file without any problems. Looking for some Notepad alternatives? Here are the 6 best text editors available right now. Alternatively, you can start Command Prompt as administrator and use it to start Notepad and edit the hosts file. To do that, follow these instructions: If you’re having trouble accessing Command Prompt as an admin, then you better take a closer look on this guide.
  2. Copy the hosts file to a different location Edit your hosts file easily by following this step-by-step guide. SPONSORED
  3. Make sure hosts isn’t set to Read-only Now you should be able to make the necessary changes to the hosts file. After you’re finished, it might be a good idea to set hosts file back to Read-only mode again. Sometimes, all your documents are read-only, including your hosts file. If you want to change them properly, you can find more info about that in this quick guide.
  4. Change the security settings for hosts Epic guide alert! no more File Explorer issues for you. Fix them all with the help of this extensive guide!
  5. Use the hidden administrator account Most system files are protected, therefore you need an administrator account in order to make changes to them. Since hosts are one of the system files, it requires an administrator account in order to edit it. If you don’t use an administrator account, you can enable a hidden administrator account and use it to make the changes to the hosts file. Learn everything there is to know about the administrator account and how you can enable/disable it right here! After you made the changes to the hosts file, you can come back to your original account, start Command Prompt as administrator again and enter net user administrator /active:no to disable the hidden administrator account. The hosts file is a system file, so it’s protected, and usually, it’s not advised that you edit it, but if you decide to do so, it’s always good to know how to reset hosts file to default in Windows 10 in case anything goes wrong. If you have any more questions, feel free to leave them in the comments section below.

Name * Email * Commenting as . Not you? Save information for future comments
Comment

Δ