How To Edit The Hosts File Or Replace The Hosts File

Below I look at an easy way to edit the Hosts file or to replace the hosts file. There is a video  and written explanation the steps that are needed to be done.

Editing the Hosts File can be sometimes to tricky to do if you don’t know how to do it. Below is a video demonstrating a simple way to modify the Hosts file. Below that is a written explanation of the process.

 

Location Of The Hosts File

You will find the Hosts file usually in the following location on a windows PC

C:\Windows\System32\drivers\etc

How To Edit The Hosts File

How To Edit The Hosts File

 

The reason that it is difficult to edit is because the Hosts file is a system resource that is protected to prevent it being accidentally changed. To change it you need to have the right access permissions on your user profile. Unless you have administrator rights you won’t be able to edit and save it. You also need to open it in notepad using the Run as administrator. There is a specific process to doing this.

I have found an easier way to update the Hosts file. I have made a video that demonstrates how quickly and easily edit the hosts file. When you do this you will need to have either administrator user rights or have the administrator user name and password.

Step By Step How To Edit The Hosts File Or Replace The Hosts File

The steps that are shown in the video are as follows:

1) From the Windows key go to the “Accessories” fold and open it

2) Locate the program “Command Prompt” and highlight with your mouse then click the right button on your mouse and click “Run as administrator”

3) You need to change the directory that is showing on the screed. To do this you need to use the “Change Directory” command which is “cd”. Type the following

 

cd C:\Windows\System32\drivers\etc

 

This will open up the folder where the hosts file is located assuming that your is located in the same location.

4) The next step is to open the Hosts file. To open the Hosts file in Notepad type the following:

notepad hosts

5) When the Hosts file opens you can then edit as you need to. Usually the first line is as follows and should not be changed

# 127.0.0.1 localhost

 

The last line in the Hosts file is as below and should not be changed.

::1   local host

Enter you data between the “# 127.0.0.1 localhost” and “::1   local host”

When you have finished click File and save and the Hosts file will be updated.