Skip to content

How To Blog

how to

  • How to Bypass Torrent Blocking by your ISP How-To
  • How to Transfer Files from Android Storage to an Internal SD Card Smartphones
  • Best credit card calculator 2020 Calculator
  • Google set reminder Computer Tips
  • Change or Remove Headers and Footers When Printing in Internet Explorer or Edge How-To
  • The Three Best Job Hunting Sites That Take ‘Job Search’ to New Heights Cool Websites
  • Change to Landscape Orientation in Google Docs Office Tips
  • Fix NT Kernel & System Process High CPU Usage in Windows How-To

How to Edit the Hosts File in Windows

Posted on October 8, 2020 By blog_786 No Comments on How to Edit the Hosts File in Windows

The hosts file is a text file located in one place in all modern versions of Windows. Most people don’t even need to dig into this, but if you do, you will need to know how to open and edit the hosts file.

However, some versions of Windows do not allow direct editing of the hosts file. In fact, you will get an error if you try to save the changes. Fortunately, there is a simple tip you can use to edit your hosts file on Windows 10, 8, 7, Vista, or XP.

How to Edit the Hosts File in Windows

What does a hosts file do?

The original purpose of the hosts file was what DNS servers do now — mapping friendly domain names to hostile IP addresses.

It is much easier to remember a domain name, like YouTube.com, than an IP address, like 172.217.1.238. Instead of having to enter the IP address in the address bar every time you want to watch YouTube videos, you can simply enter the domain name and the DNS server your device is using will match the name with the correct address so you can access to a web page is much easier.

The hosts file, since it serves as a kind of DNS server, works the same way. You can enter the IP address to which the domain name should be resolved. In other words, you can tell your computer to load an IP address other than the DNS server, which will allow you to do a few interesting things.

Why is the Hosts file edited?

One of the reasons for editing the hosts file is because you want a super easy way to block websites from loading on your computer Enter an invalid or incorrect IP address for the site you want to block, and every time you try to access it, the hosts file will load the IP of your choice. Depending on what you choose, it can block the website completely.

– /

You can use the same technique to force the hosts file to block malicious sites. There are even lists of hosts file entries (like this one) that you can download and import into your hosts file to block hundreds of malicious sites or ads.

Another use case for the hosts file is to speed up web browsing. If the DNS server you are using is down or is not fast enough, manually entering the IP address and domain name mappings in the hosts file allows your computer to find those addresses almost instantly, rather than relying on the DNS server.

Tip: Learn how to use alternate DNS servers for faster Internet access.

Windows Hosts file location

You need to know where to find the hosts file before you can open it for editing. This is the location of the hosts file on Windows 10 through Windows XP:

C: Windows system32 drivers etc

How to Edit the Hosts File in Windows

How to Edit the Hosts File

The hosts file is a text file, which means you will need a text editor to make changes to it. However, since the hosts file is super-basic and does not require working with hyperlinks, images, etc., you can use a basic text editor (i.e. no need to use a full-fledged editor like Microsoft Word).

Opening the Hosts file

Let’s start by simply opening the hosts file. We’ll be using Notepad, which is built into Windows 10 through Windows XP.

  • Open the Run dialog box by holding the Windows key and then pressing R once.
  • Type Notepad and press Enter to open the program.

  • Go to File> Open.
  • In the file name text box below, type (or copy and paste) the location of the hosts file shown above and press Enter.

How to Edit the Hosts File in Windows

  • Select the menu to the right of the text box to change text documents (* .txt) to All files (*).

How to Edit the Hosts File in Windows

  • Double-click hosts in the file list to open the hosts file for editing in Notepad.

Editing the Hosts file

How to Edit the Hosts File in Windows

The hosts file has several examples showing how to format entries. You must first give the IP address and then the domain name, and the two must be separated by at least one space (a tab is a good way to format them).

Here are some examples:

127.0.0.1 www.google.com
13.249.79.104 www.bing.com

How to Edit the Hosts File in Windows

As you can see in the image above and read from the directions in the hosts file, the # character is used as a comment, which means that anything that follows it is avoided. This is why the above two example lines are useful in this hosts file; they are not accompanied by this symbol.

Related: edit Hosts file to add local DNS lookup

If you want to block websites with the hosts file like YouTube, Amazon, Google, Reddit.com, etc., you can enter a fake IP address like 0.0.0.0.

How to Edit the Hosts File in Windows

Note. When you enter the URL of a site that you want to associate with a specific IP address, be sure to exclude the leading part and only enter the subdomain like www or whatever for the site you add.

Save Hosts File

This is how we save the hosts file to make sure it works no matter what operating system you are using, which text editor you choose, or how your Windows settings are configured:

  • Go to File> Save as.
  • Change the Save as type setting to All Files (*).
  • Rename the file hosts.backupfile and then save it to your desktop.
  • Close Notepad and find the hosts file you just created on your desktop. You want to remove part of the .backupfile name and leave only hosts (no period or text after word).

How to Edit the Hosts File in Windows

  • After that, navigate from file to another on the desktop and confirm the name change when asked.
  • Copy the hosts file.
  • Open the location of the hosts file that you opened earlier ( etc folder).
  • Paste the hosts file you copied from the desktop and confirm any rewrite prompts if you see them.

How to Edit the Hosts File in Windows

–

How to Edit the Hosts File in Windows

Windows 7

Post navigation

Previous Post: What Is a CDN & Why Is One Essential If You Own a Domain?
Next Post: Why Microsoft Edge May Be The Best Browser For Your Smartphone

Related Posts

  • Turn Off Admin Approval Mode in Windows 7 Windows 7
  • How To Clear The Windows Memory Cache Windows 7
  • Change How Windows Prompts for Admin Approval Mode Windows 7
  • Fix the Maximum Amount of Memory Usable by Windows 7 64-bit Windows 7
  • Create a Custom Windows 7 Install Image Windows 7
  • What Is ehprivjob.exe, Uses, and How to Disable it Windows 7

Leave a Reply Cancel reply

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

  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • How-To
  • iOS
  • iPad
  • iPhone
  • Linux Tips
  • macOS
  • MS Office Tips
  • Networking
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • January 2023
  • December 2022
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018

2021 Android ) Apple apps Best browser change Chrome Closing words Concluding remarks Download email Error Facebook From Google Image Internet Keyboard Mac make Movies Music online Packaging phone? Photos Print Shortcuts sites Switch Time Tips Tricks turn using Video Videos Watch What With Word Working? your YouTube

  • OTT Explains – UAC (User Account Control) in Windows 10 Windows 10
  • How To Make a Simple Chrome Extension How-To
  • How to Unlink Any Service From the Google Assistant How-To
  • Android Pie (version 9) Review – The “Techie” Smartphone OS Gets Smarter and Friendlier Smartphones
  • Setup Different Backgrounds for Dual Monitors in Windows 7 Windows 7
  • How to Enable the God Mode Control Panel in Windows Computer Tips
  • How To Fix ‘Move To iOS Not Working’ iOS
  • 5 Ways To Force Quit Apps On Your Mac OS X

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}
Go to mobile version