Skip to content

How To Blog

  • How do I customize the Ribbon in Office 365? Office Tips
  • How to See Someone’s Location on an iPhone iPhone
  • How to Create a Routine With Amazon Alexa Smart Home
  • 6 Best Face Swap Apps For Mobile Or PC 2021 Software Reviews
  • How to Find the Best Deals Online and Save Money While Shopping

    How to Find the Best Deals Online and Save Money While Shopping

  • Fix “Word Cannot Start the Converter MSWRD632.WPC/SSPDFCG_x64.CNV” Error Office Tips
  • Improve Your LinkedIn Job Search With These 6 Tips Computer Tips
  • Center Your Worksheet Data in Excel for Printing Office Tips

How To Block Websites On Windows Using The Hosts File

Posted on October 7, 2020 By blog_786 No Comments on How To Block Websites On Windows Using The Hosts File

Why do you need to know how to block websites? Maybe you want your kids to be safe online? Maybe you want to block distracting sites so you don’t have to procrastinate? It can also be used to block ad-embedded tracking sites.

Whatever the reason, you can simply block websites on Windows 10 using the so-called hosts file.

How To Block Websites On Windows Using The Hosts File

What is a Hosts file?

Have you heard the term DNS (Domain Name System)? It refers to a file system distributed over the Internet that helps translate domain names such as free-online-converters.com into its actual IP address, which turns out to be 13.225.198.106. This will help your computer know which server to talk to when you want to view this site.

How To Block Websites On Windows Using The Hosts File

Prior to DNS in 1984, this was done through a local file on your computer called the hosts file. At the time, computers were not linked to many other computers. At best, we could connect to several dozen. Keeping all this information in a plain old text file was easy. The host file is alive today.

How does the hosts file work?

The hosts file allows a computer to look for other computer names like localhost or domain names like free-online-converters.com and their IP address is next to the name in the file. It’s a bit like how your friends’ names are linked to their phone numbers on your phone. You don’t need to memorize or dial a number, just search for the person’s name.

Before going any further, it’s important to understand that some IP addresses are reserved for local use. This means that they can only be used to point to your computer and devices on your immediate network. This means anything before your message connects to the Internet.

– /

How To Block Websites On Windows Using The Hosts File

For example, the IP address 127.0.0.1 always means the computer you are working on, also known as localhost. Try entering this into your web browser. Most likely, a blank page will open.

Also keep in mind that www.website.com and website.com are not the same thing. For both of them to take us to the same website, both must use the same IP address.

  1. Open Notepad as administrator.

Block Websites Using the Hosts File

  1. Open Notepad as Admin .

  1. Click File> Open.

How To Block Websites On Windows Using The Hosts File

  1. Navigate to C: Windows System32 Drivers etc

How To Block Websites On Windows Using The Hosts File

  1. Once there, change the file type from Text Documents (* .txt) to All Files (*. *).

How To Block Websites On Windows Using The Hosts File

  1. You can now see the hosts file. Open it up.

How To Block Websites On Windows Using The Hosts File

  1. Go to the last line of the page and add your line. Let’s say we block Facebook.

How To Block Websites On Windows Using The Hosts File

How To Block Websites On Windows Using The Hosts File

Enter the localhost IP address 127.0.0.1. Press the tab key and enter facebook.com. Press Enter to move to the next line. Create a second line similar to the one above, but use www.facebook.com instead of facebook.com.

How To Block Websites On Windows Using The Hosts File

Is the website blocked?

Open a command prompt and ping facebook.com, then ping www.facebook.com. You should see that the IP address it is trying to check is 127.0.0.1.

How To Block Websites On Windows Using The Hosts File

Now open your web browser and go to facebook.com. It can still load! Why? Facebook’s real IP address may still be in the browser cache and the browser will use that IP address first. Clear your browser cache and try Facebook again. You should now see an error page.

How To Block Websites On Windows Using The Hosts File

I don’t want to see an error page

You can try redirecting the site to a different IP address, but this won’t work these days. Malicious editing of the hosts file has been a frequent attack by hackers. Web browsers now carefully check for certificates to prevent this. But you can still try.

How To Block Websites On Windows Using The Hosts File

Another way not to see the error page is to install and configure a web server on your computer and point the hosts file to it. Maybe it will display a page that says “Get back to work!” or lists some of your goals as motivation to stay away from social media.

What else can I do with the Hosts file?

You can use the same technique, but paste the URLs of various malware and tracking ads. There is a pre-created hosts file for malware and ad sites that you can copy and paste into your hosts file. At the time of writing, it was last updated in March 2020.

–

How-To

Post navigation

Previous Post: How To Set Up & Configure TCP/IP Files On Linux (TCP/IP Settings For Linux)
Next Post: How To Deactivate or Delete A Pinterest Account

Related Posts

  • How To Turn An Old Laptop Into a Chromebook How-To
  • WWDC 2020 – How to Allow Limited Photo Access on iOS 14 How-To
  • These Services Are Free During Quarantine How-To
  • Fix “Windows was unable to find a certificate to log you on to the network” How-To
  • 4 Ways To Find Large Files In Windows 10 How-To
  • 5 Ways to Disable Startup Programs in Windows

Leave a Reply Cancel reply

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

Archives

  • June 2023
  • May 2023
  • April 2023
  • 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
  • March 2021
  • 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
  • September 2018
  • August 2018

Categories

  • Amazon Web Services
  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Featured Posts
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • Help Desk
  • How-To
  • iOS
  • iPad
  • iPhone
  • Linux
  • Linux Tips
  • macOS
  • MS Office Tips
  • Networking
  • Office Tips
  • OS X
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tools Review
  • Troubleshooting
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Windows XP Tips
  • Wordpress

Recent Posts

  • 10 best clock widgets not to be lost on your iPhone home screen
  • Can I change the file type in Windows 10?
  • How to create line graphs in Google Sheets
  • Best Ways to Create Your Own 3d Printed Lithophanes?
  • Top 5 3D Modeling Apps for iPad Pro

Recent Comments

  1. Can I change the file type in Windows 10? - How To Blog on The 7 Best PDF Readers for Windows In 2020
  2. How to create line graphs in Google Sheets - How To Blog on How To Format Spreadsheet Cells To Automatically Calculate Amounts
  3. Best Ways to Create Your Own 3d Printed Lithophanes? - How To Blog on 10 Best 3D Printers for Beginners Under $500
  4. Top 5 3D Modeling Apps for iPad Pro - How To Blog on How To Use Apple Sidecar
  5. The 5 Best Original Netflix Animations You Can Stream Now - How To Blog on check netflix video quality internet explorer
  • How to create a thread on Twitter and how to view 2022 Computer Tips
  • USB 2.0 vs. USB 3.0 vs. eSATA vs. Thunderbolt vs. Firewire vs. Ethernet Speed Computer Tips
  • Comparing 4 best Offline Maps Apps for Smartphones How-To
  • Best statistical calculator 2020

    Best statistical calculator 2020

  • Fix Audio Static Crackling Popping with Realtek Sound Card Windows 7
  • Fix FaceTime “The Server Encountered An Error Processing Registration” Error General Software
  • 7 Best Wireless Keyboard And Mouse Combos For Any Budget Product Reviews
  • Free Up Space on Your Chromebook How-To

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version