How To Edit, Reset The Windows Hosts File?

Affiliate disclosure: In full transparency – some of the links on our website are affiliate links, if you use them to make a purchase we will earn a commission at no additional cost for you (none whatsoever!).

How To Edit, Reset The Windows Hosts File? That’s your problem? Well good news for you, the solution is pretty simple, and if you bear with me for the next 2minutes, you’ll have edited or reset your Windows Host file and you wouldn’t even know about it.

Being honest, I can give you the solution right away, it’s almost as easy as creating a new folder, but there are two reasons I won’t.

First, I need to make this article long enough, a minimum requirement if I want this article to rank and help other guys out (I’m just being straight and honest) and second, I need to make sure whatever idea you have of the Windows host file and its function, is correct and not misinterpreted before giving you an answer to your question How Do I Change My Hosts File.

What is the Windows Host File?

Honestly? It’s not something simple, at least not as simple as I’m gonna make it sound to you, so make sure that unless you have a good idea what you’re doing, just don’t do it.

We all know an Operating system comprises of “hosts”, right? And we all know the internet is made up of “IP Addresses”.

Now the Windows host files have the responsibility to map your host files with the IP Addresses, in much simpler language, let’s just say “howdiary.com” is the human-friendly version of the actual IP address of the website, which would be something like xxx.xx.xxx.xx.

Now the Hostnames connect the Human-friendly addresses with their Internet-friendly Ip addresses. Yeah, that’s pretty much about it.

How to Read-Host File?

Just to make it clear, Host files are just a text/notepad file, which consists of the IP addresses and their concerned hostnames. So reading them is fairly easy, you can use any kind of text editor to open them up and have a look.

How To Edit, Reset The Windows Hosts File:-

So okay finally to the section you’ve been waiting for, How to edit host file?

This next step remains the same for every operating system, so I’ll write it just once, and then you can proceed.

How To Edit, Reset The Windows Hosts File

Click on the start button and type “notepad”.

And then choose “notepad”

How To Edit, Reset The Windows Hosts File

Important:- Make sure you follow the exact steps as above, right-clicking and then creating a new notepad file won’t work.

Now, you need to paste some things into it, choose your operating system from the following section, and then copy all the text from that section into your notepad file.

I’m giving away the default Host file values, so copy-pasting it directly will reset the Windows host files f

For Windows XP:-

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost

For Windows 7

# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handle within DNS itself.
#       127.0.0.1       localhost
#       ::1             localhost

For Windows 8

# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host
# localhost name resolution is handle within DNS itself.
#       127.0.0.1       localhost
#       ::1             localhost

So once you’ve pasted the above text in your notepad file, hit File > Save as.

How to read host file

And set “HOSTS” as the file name while saving it. (Including the quotations!)

How to edit host file

Now again hit the Start button, and type Run > select the “run” program.

How to edit host file

Now copy this exact line there and paste it:- %WinDir%\System32\Drivers\Etc

How Do I Change My Hosts File

One the new window, you’ll see a file named “host”, rename it to host.old

How To Edit, Reset The Windows Hosts File

Now just copy your notepad file which you just created some time ago to this folder and you’re done!

How to Edit the Host Files:-

Well, it’s the same process, just forget about creating the whole new notepad file. Instead, just hit the Start button, type run, and paste the line:-%WinDir%\System32\Drivers\Etc there.

How To Edit, Reset The Windows Hosts File

Once that’s done and you see the hosts file, just right click > Open with Notepad.s

Voila! Now you can edit the file as you wish.

Final Words:-

So that was all I had on How To Edit, Reset The Windows Hosts File guys. I hope I made the steps not too messy?

Although if you do get stuck somewhere in the steps, you can always find me in the comment box. Also, not to mention I’d love to hear your feedback about this whole article, the writing style, the simplicity (or hardships, if any!)

evanderek

Leave a Comment