How to block a site in Safari (with images)

How to block a site in Safari (with images)
How to block a site in Safari (with images)
Anonim

You can prevent Safari from accessing a specific site, whether on iPhone or Mac. You can change the settings in the Restrictions menu on iPhone, but you will need to edit the hosts file on Mac to block a website.

Steps

Method 1 of 2: Set up Safari on iPhone

Block a Website in Safari Step 1

Step 1. Open your iPhone settings

Iphonesettingsappicon

Press the gray toothed wheel app. Usually found on the home screen.

Block a Website in Safari Step 2

Step 2. Scroll down and press

Iphonesettingsgeneralicon

General.

General can be found in the third group of options at the top of the settings page.

Block a Website in Safari Step 3

Step 3. Scroll down and tap Restrictions

This option is in the middle of the page.

Block a Website in Safari Step 4

Step 4. Enter your restrictions code

This is the code you created when you activated the restrictions. It may be different from your iPhone password.

  • If you haven't activated your restrictions yet, tap Activate restrictions then enter your password twice.
Block a Website in Safari Step 5

Step 5. Scroll down to the Allowed Content section

Tap Websites which is in the middle of the page.

Block a Website in Safari Step 6

Step 6. Tap Limit adult content

This option is at the top of the page. A blue check mark will appear next to it to indicate that it has been activated.

Block a Website in Safari Step 7

Step 7. Select Add Website

Select this option in the section NEVER AUTHORIZE (and not in the section ALWAYS ALLOW) at the bottom of the page.

Block a Website in Safari Step 8

Step 8. Enter the URL of your website

This must be the website you want to block. Be sure to include all elements of the URL (eg "www.example.com" not "example.com").

Block a Website in Safari Step 9

Step 9. Tap Done

It's a blue button at the bottom right of the keyboard. The website you specified will be blocked in Safari.

Method 2 of 2: Set up Safari on a Mac

Block a Website in Safari Step 10

Step 1. Open Spotlight

Macspotlight

Click on the magnifying glass icon in the upper right corner of the screen.

Block a Website in Safari Step 11

Step 2. Type terminal in Spotlight

Your Mac will search for the Terminal application.

Block a Website in Safari Step 12

Step 3. Click

Macterminal

Terminal.

It should appear at the top of the results under the Spotlight search bar.

Block a Website in Safari Step 13

Step 4. Type

sudo nano / etc / hosts

in the Terminal.

Press the Return key to issue a command that will open the hosts file. This is a file on your Mac that controls which websites you can access on all web browsers, including Safari.

Block a Website in Safari Step 14

Step 5. Enter your administrator password and press Return

This is the password you use to log into your Mac. You will not see the characters displayed, but they will still be entered in Terminal.

Block a Website in Safari Step 15

Step 6. Wait for the hosts file to open

It may take a few seconds, but once it opens you can edit it.

Block a Website in Safari Step 16

Step 7. Scroll to the end of the file and press Return

Use the down arrow to navigate to the end of the file. Press the Return key to create a new line.

Block a Website in Safari Step 17

Step 8. Type

127.0.0.1

and press Tab ↹.

This should leave enough space between 127.0.0.1 and the next piece of text.

Block a Website in Safari Step 18

Step 9. Enter the URL of the website you want to block

This involves typing www., The name of the website (eg Google) and. com,. net or. org.

  • The line should look something like:

    127.0.0.1 www.facebook.com.

  • If you are blocking multiple websites, each URL will need to be entered on a different line.
Block a Website in Safari Step 19

Step 10. Save and exit the editor

Once you have indicated all the sites you want to block, save and exit the editor by pressing

Ctrl + O then Return. To exit the hosts file, press Ctrl + X.

Block a Website in Safari Step 20

Step 11. Clear your DNS cache

For the changes to take effect, you must clear your DNS cache by typing

sudo killall -HUP mDNSResponder; say DNS cache has been flushed

and pressing Return.

Popular by topic