Access Denied when editing hosts file in windows 10

If you are facing access denied issue when you modify the changes on the Hosts file and you are not able to make changes on the Hosts file. Please follow the below steps to fix the issue:

In this article, I will let you know two methods to fix the issue.

Edit windows 10 host file as an administrator

Method 1:

Step 1: Click on start or go to the window search bar and search notepad. Do right-click on the notepad and click on the Run as administrator.

Step 2: A window will be prompt for confirmation chose yes. It will ask for an administrator password if you have an administrator password. You need to type the password and do click on the yes button.

Step 3: Now open the Hosts file. Make the changes in the file and click on the Save button. Now you will able to save the file. Now you will not get any error.

Method 2

Step 1: Click on start or go to the window search bar and search command prompt. Do right-click on the command prompt and click on the Run as administrator.

Step 2: A window will be prompt for confirmation choose yes. It will ask for an administrator password if you have a password on your system. You need to type the password and do click on the yes button.

Step 3: Now we will run commands to open the Hosts file:

Run following commands:

cd /

cd C:\Windows\System32\drivers\etc\

notepad hosts

When we run the notepad hosts command, a hosts file will open in the notepad. You can modify the changes on the file and save the file. You will be able to make the changes now.

Thanks for reading, feel free to reach out to me for any comments and suggestions. I hope you found the article helpful and you were able to fix the access denied issues.

Leave a comment

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