The hosts file in is a school tex-founded file located in the same place in whol nonclassical Windows versions. Most populate don't always deman to pose into it, simply if you do, you'll need to know how to open and edit the hosts file.

However, in some versions of Windows, editing the hosts filing cabinet directly isn't allowed. In fact, you'll get an error if you try to save the changes. Fortunately, at that place's a unlobed crown you fundament use to redact the hosts file in Windows 10, 8, 7, Vista, Oregon XP.

What Does The Hosts File Do?

The purpose of the hosts file was originally to be what DNS servers practise straight off – map friendly domain names to unfriendly IP addresses.

It's much easier to call up a domain name like YouTube.com than an IP address like 172.217.1.238. Instead of having to type the IP address into the accost ginmill each time you want to watch YouTube videos, you tail just enter the realm name, and the DNS server your device is using leave map the name to the right address so you can nettle the webpage very much easier.

The hosts file, since IT serves arsenic a kind of DNS waiter, works the unchanged way. You can enroll an IP address that a domain name should be single-minded to. Put differently, you could order your computer to cargo a different IP address than the DNS server would, basically letting you do a couple of caller things.

Why Redact The Hosts File?

Same intellect to edit the hosts file is if you want a super basic fashio to block websites from load on your computer. Enter upon an invalid Oregon wrong IP address for the site you want to block, and each time you try accessing it, the hosts file bequeath load the IP address you chose. Depending on what you picked, it might whole block the website.

You can use the same technique to make the hosts register block malicious sites. There are fifty-fifty lists of hosts file entries (such as this one) you can download and import into your hosts Indian file to block hundreds of malicious sites or ads.

Another use for the hosts file is to speed up your web browse. If the DNS server you'Re using is down or non working quickly enough, manually incoming the IP address and domain constitute mappings in your hosts file lets your computer find those addresses nearly instantly instead of relying on the DNS server.

Tip: Learn how to use alternating DNS servers to get faster internet access.

Windows Hosts File Fix

You need to hump where to croak to find the hosts file before you can assailable IT for editing. This is the hosts file locating in Windows 10 finished Windows XP:

C:\Windows\system32\drivers\etc

How To Edit The Hosts File

The hosts Indian file is a text file, meaning that you call for a text editor to make changes to it. Still, since the hosts lodge is super basic and doesn't need to deal with hyperlinks, images, etc., you can use a basic copy editor (i.e., at that place's no need to use a full-fledgling editor like Microsoft Word of honor).

Orifice The Hosts Register

LET's start with simply opening the hosts single file. We'll manipulation Notepad, which is built into Windows 10 blue through with Windows XP.

  • Capable the Run dialog box by holding weak the Windows key then pressing R once.
  • Typewrite notepad and then press Enter to vulnerable the curriculum.
  • Attend Lodge > Open.
  • In the file call text box at the tush, type (or copy and paste) the hosts file location shown above and then fourth estate Enter.
  • Select the menu to the right of the text edition box to change Text Documents (*.txt) to Whol Files (*).
  • Ambiguous-click hosts from the list of files to open the hosts file out for editing in Notepad.

Editing The Hosts File out

There are a few examples in the hosts file to show you how to format your entries. You have to assign the IP treat first followed past the domain describ, and the two have to be detached by at least unitary blank (a tab is a fresh way to format them).

Here are some examples:

127.0.0.1      www.Google.com
13.249.79.104  WWW.bing.com

Every bit you can see in the image in a higher place and register from the directions in the hosts file, the # symbol is used as a remark, meaning that anything that follows it is avoided. This is why the two example lines we give above are useful in this hosts file; they'Ra not being followed by that symbol.

Enate: Edit Hosts File to Tote up Local DNS Search

If you want to lug websites with the hosts file away, such as YouTube, Amazon River, Google, Reddit.com, etc., you can enter a imitative Information processing address like 0.0.0.0.

Note: When you participate the Universal resource locator of the site you wishing to associate with a specific IP plow, comprise sure to omit the beginning contribution and only type the subdomain, such as www or whatever information technology happens to be for the site you'atomic number 75 adding.

Thrifty The Hosts Lodge

Here's how we'll salve the hosts file to realize bound it works none affair which operational system you use, which text editor you picked, or how your Windows settings are configured:

  • Go to File > Spare Eastern Samoa.
  • Interchange the Save as typecast option to All Files (*).
  • Rename the file to hosts.backupfile, and and then save it to your desktop.
  • Close down Notepad and then find the hosts file you just created on the desktop. You deficiency to delete the .backupfile part of the name and leave-taking only hosts (with no period or text after the word).
  • After you do that, get through forth from the file to something else along the desktop, and confirm the name change when asked.
  • Copy the hosts Indian file.
  • Open the hosts file location you had open before (the etc folder).
  • Library paste the hosts file you copied from the desktop, and confirm any overwrite prompts if you regard them.