--> How to Block Any Website On Your Computer (Windows and MAC) | Computer and Mobile Tips and Tricks

How to Block Any Website On Your Computer (Windows and MAC)

Sometimes you need to block some specific websites from your Office or Home PC. For many reasons, you have to do that. For parental control,...

Sometimes you need to block some specific websites from your Office or Home PC. For many reasons, you have to do that. For parental control, you have to do that for blocking adult content from your child PC or for controlling the office PC and confirm that no one using social media or any of the related websites in office. And you can also block some app websites to block the update system of the app or verification of purchase. Now,

How can you block a website from your windows?

Let's see, First, you can do it via the hosts file. A hosts file is a complex document of the internet rules on your PC. It contains the mappings of IP addresses to hostnames, you can totally block all kind of network connection in your computer but now we see how to block a website through it. Now I'm Showing you how do you do that.

Method - 1

  1. Open Notepad on your computer with administrator access. The animation picture of above is an example of it.
  2. Through the notepad software, click File > Open and go to C:\Windows\System32\drivers\etc\ in bellow select All Files and the hosts file appear then open it.
  3. The last two lines of your hosts file should read "# localhost" and "# ::1 localhost".
  4. At the end of the file, you can add the addresses of websites to block. To block Google, for example, add " www.google.com" to the end of the file without the quote marks. You can block as many sites as you want this way, but remember you can only add one per line.
  5. Repeat this step until you've added all the websites you want to block.
  6. Now close the hosts file and click Save. Reboot your computer for the changes to take effect and you'll find that all those websites are now blocked.

Method - 2

Now I'm providing you a shortcut of the above work in a programing file(.cmd). This file will help you to add all the lines in your host file and it helps you to block the website in one click. But to unblock the website you have to remove the line from the hosts file using the Method-1.

All the details is up on the picture and now you can download the file from bellow. You don't need to be expert for editing the file. Just simple logic you have to understand with the help of the above picture or simply you can use Method 1.

Download the file and Right-click on the file and click Edit on the command box.

How to Block Any Website On Your Mac

  1. Make sure you have administrator access to your Mac. Now open Terminal. You can find it under /Applications/Utilities/Terminal.
  2. Type Sudo nano /etc/hosts and press enter. Enter the user (login) password when prompted.
  3. This will open the file /etc/hosts in a text editor. Type the name of the website in a new line in this format " www.blockedwebsite.com" (minus the quotes). For each website you want to block, start a new line and type the same command with only the name of the website being replaced. When done, press ctrl+x and then Y to save changes.
  4. Now key in the command sudo dscacheutil -flushcache and press Enter or restart your machine to make sure the websites are blocked.



AI News,2,Amazon,1,AMD vs. Intel,1,Blogger Template,1,Boot Problems,4,ChatGPT,2,Computer,31,Computer Programming,4,Computer Software,20,Conversion,1,Data & Recovery,3,Download IDM,5,Driver Solution,2,Firmware Installing,3,Fiverr,2,Freelance,3,Games,5,Garena Free Fire,3,Hacking,8,Hardware,3,Microsoft Office Softwares,6,Mobile,14,Mobile Brands,2,Mobile Information,2,Mustek,1,Original Driver Disk,1,Paid_Software,2,Payments Rules,1,Performance,4,PUBG Mobile,2,Router Choice,1,SEO,6,Smartphone_Performance,1,Software,1,Specification,6,Troubleshooting,5,Upcoming,5,Video Making Tips,3,WhatsApp Group,7,Windows 11,2,Windows 365,1,Windows OS,4,WordPress,1,
Computer and Mobile Tips and Tricks: How to Block Any Website On Your Computer (Windows and MAC)
How to Block Any Website On Your Computer (Windows and MAC)
Computer and Mobile Tips and Tricks
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content