How to Disallow a Site from Opening

Last modified: Feb 14, 2021 4:00 PM
5 2491 Last modified Feb 14, 2021 4:00 PM

How to Disallow a Site from Opening

I recommend this be used by Apple users who are high-end. If you are not a high-end Apple user., then use your browser settings. Use at your own risk.


Excellent for Parental Control:

This is an important tool to use for parental controls and for yourself when you want to avoid visiting particular sites that you never want to visit.


Disallowing a Site from Opening:


This is Performed in Terminal:

Use the Host File Database in Terminal to perform this. Because all three of these sites use IP Version 6, the address must start with: fe80::1%lo0 (for note:, if IP Version 4, just include the site name, without fe80::1%lo0 ).


So, for instance, the following are what to use in steps 3 and 4 shown below:

Facebook:

fe80::1%lo0 www.facebook.com
fe80::1%lo0 facebook.com


Twitter:

fe80::1%lo0 www.twitter.com
fe80::1%lo0 twitter.com


Parler:

fe80::1%lo0 www.parler.com
fe80::1%lo0 parler.com


Seen in Full:

---


Explained In Depth:

These is the steps to take, provided in full. Note that the commands are underlined.


Step 1. (Screenshot 1)

Open Terminal through Spotlight Search:

  1. Open: Spotlight Search: [Hold command key + Press Spacebar key]
  2. Type: terminal
  3. As you Type: the name of the application, it will popup
  4. Select: Terminal to open it



Step 2. (Screenshot 2)

Open the "Host File Database" in Terminal:

  1. Type: sudo nano /etc/hosts
  2. Press: return key
  3. Type: your system administrator password



Step 3.

Add the Address you want to block:

  1. Press: Down Arrow key to get below where is reads ::1 :locahost, or the last listed item.
  2. Type: 127.0.0.1
  3. Press: spacebar key
  4. Type: the address name you want to block. (i.e. fe80::1%lo0 facebook.com)
  5. Press: return key


Step 4.

Add the Address you want to block, with the www. Prefix:

  1. Type: 127.0.0.1
  2. Press: spacebar key
  3. Type: the same address, this with the www. prefix in front of it (i.e. fe80::1%lo0 www.facebook.com)
  4. Press: return key


Step 5.

Save the Changes:

  1. Use: [Hold Down: control key + Press: O]
  2. Press: return key


Step 6.

Exit the "Host File Database" in Terminal:

  1. Use: [Hold Down: control key + Press: X]


Step 7.

Clean Terminal Use:

  1. Type: sudo dscacheutil -flushcache
  2. Press: return key


Step 8.

  1. Close: Terminal


Step 9.

Try visiting this in any web browser

---


What this Does

This provides a blank site when opening, because every loading of the site is basically looped. This is an important tool to use for parental controls and to avoid visiting of particular sites that you never want to visit. In this example post, these three sites are provided as example you could block, each provided with a screenshot:

  • Facebook (Screenshot 3)
  • Twitter (Screenshot 4)
  • Parler (Screenshot 5)

---


Screenshots:

Click to enlarge.

  • Screenshot 1.

Open Terminal through Spotlight Search:


  • Screenshot 2.

Open the "Host File Database" in Terminal:


  • Screenshot 3.

Facebook blocked out:


  • Screenshot 4.

Twitter blocked out:


  • Screenshot 5.

Parler blocked out:


[Re-Titled by Moderator]

Comments

Feb 14, 2021 4:00 PM

Undoing These Entries:

To undo one or more of these items you've entered here, you need to delete of them from the list in Terminal***

***Screenshot of all items deleted:


Screenshots of Each Domain Being Once Again Accessible:

Click to enlarge.

  • Screenshot 1.

Facebook Being Once Again Accessible:


  • Screenshot 2.

Twitter Being Once Again Accessible:


  • Screenshot 3.

Parler Being Once Again Accessible:

NOTE: As of this Post, Parler is inaccessible on its own part, but it still shows up


Feb 14, 2021 4:00 PM

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.