Skip to content

5000+ Great Articles

Best Articles & Essays: Interesting Articles to Read Online

  • Search Outlook Email by Sender, Date, Keyword, Size and More MS Office Tips
  • Best ti 89 titanium graphing calculator 2020

    Best ti 89 titanium graphing calculator 2020. 1 - Texas Instruments TI-89 Advanced Graphing Calculator Top Reviews Very

  • iTunes Not Syncing Entire Music Library? iPad
  • Best printing calculator desktop 2020 Calculator
  • How to Share Hotel Wi-Fi With Multiple Devices How-To
  • 6 Best Math Apps For Kids

    With the rapidly changing state of the education system, teachers and parents today have to adapt using and at home. When it comes to teaching kids

  • What Is The Internet Time Machine & 3 Creative Uses For It

    The /" target="_blank" rel="noopener"/" target="_blank" rel="noopener"Internet Time Machine, often referred to as the Wayback Machine, is one of the m

  • The 12 Best Bookmarklets Every Browser Should Have Cool Websites

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.

–

Share this:

  • Twitter
  • Facebook
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 Connect a Computer To a Mobile Hotspot How-To
  • How To Powerwash (Factory Reset) a Chromebook How-To
  • WWDC 2020 – How to Enable Private MAC Address on iOS 14? How-To
  • Perform a Zero Fill Using a Linux Live CD How-To
  • 15 Best Free Mockup Tools To Add Device Frame to Screenshot How-To
  • Configure NGINX Reverse Proxy – Step by Step How-To

Leave a Reply Cancel reply

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

Archives

  • September 2023
  • August 2023
  • July 2023
  • 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
  • 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

  • AI Tools & Guides
  • 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
  • islamic Books
  • Linux
  • Linux Tips
  • Mac OS X
  • 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
  • How to go Back to the old YouTube Layout (2017)
  • A Simple Trick to Get 50% Discount on Audible for Three Months
  • What Is “Other” Storage on Android And How to Clean It Up ?
  • 7 Legal Websites to Get Free Music Downloads
  • Six Copyscape Alternatives That you can use
DMCA.com Protection Status

Recent Posts

  • How to go Back to the old YouTube Layout (2017)
  • A Simple Trick to Get 50% Discount on Audible for Three Months
  • 6 Best PayPal Alternatives (2017)
  • How to Fix the the “Invalid SIM Card” Error on Android
  • What Is “Other” Storage on Android And How to Clean It Up ?

Recent Comments

  1. A Simple Trick to Get 50% Discount on Audible for Three Months on Private Browsing: What is it and What it is not
  2. 6 Best PayPal Alternatives (2017) on How to Save Money While Shopping Online in India
  3. Automatically Transcribe YouTube Video/Audio with Google Docs on 5 Best Team Management Apps (For Small and Large Teams)
  4. 6 Things You Need Know About Email Encryption on Delete All Emails from Gmail With Once Click
  5. Looking For YouTube Alternative? Try These 7 Video Sharing Sites on Ten Best YouTube Video Editing Software 2023
  • Best Cleaning App for MacOS 2020 OS X
  • Best project calculator 2020

    Best project calculator 2020. 1 - DIY Calculator Counter Kit with Acrylic Case LCD Display Multi-Purpose Electronic Calculator Counter Electronics C

  • How to Set Disk Quota Limits in Windows 7/8/10 How-To
  • How to Fix a “Security policy prevents use of Camera” Android Error Smartphones
  • 7 Google Home Mini Features You’ll Love Gadgets
  • How To Import Your Contacts To Gmail Cool Websites
  • The Best Windows 10 Screen Recorder Windows 10
  • How To Manage Your Zoom Recordings History How-To

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version