Easy Steps On How To Block A Website On Safari Mac

Get All The Errors Solved with ErrorCode0x, Call Us Now :

Blocking certain websites can save time you might have spent on irrelevant websites. Moreover, you won’t have to worry about preventing your child from getting access to adult content. Blacklisting a website is the only way to serve this purpose and it can be done in several ways. In this article, we have chosen only the two easiest methods for you. Most of the users are aware of how to block a website on Safari Mac without parental controls. Hence, we have discussed this issue by excluding this feature. So, let us know these two methods in detail.

Quicks Tricks for How to Block a Website on Safari Mac

You can do this work by the two methods we have mentioned below.

Method 1: Using the Hosts File

This method involves the following steps:

Open Spotlight

Open the Safari browser and click the magnifying glass icon at the top-right corner of the screen to launch the search bar. Type ‘Terminal’ into the search bar and press ‘Enter.’ Choose Terminal from the search results and to open the Terminal app.

Enter the Host File Command

Type ‘sudo nano/etc/hosts’ into the Terminal and press the ‘Return’ button. It opens the host file which determines which of the websites are accessible are which aren’t. Then, enter your Mac’s administrative password and press the ‘Return’ button to confirm your identity. When your identity is confirmed, the host file takes some time to open.

Create a New Line in the Hosts File

Scroll down to the bottom of the file and tap the ‘Return’ button. Then, type ‘127.0.0.1’ in it and hit the ‘Tab’ button. It creates an adequate space gap between ‘127.0.0.1’ and the next section of the text. Type in the address of the website that you would like to block and make sure that it includes ‘www’ at the starting and ‘.com’ at the end of the website name. For example, assume that you want to block Google. In that case, type ‘127.0.0.1 www.google.com.’ Type each of the URLs separately in order to block multiple sites.

Save and Exit the Editor

After mentioning all those sites you would like to block, press ‘Control’ and ‘O’ keys at the same time. Then, tap the ‘Return’ button and the red circle to exit the host file.

Flush the DNS on Mac

It is essential to refresh Safari’s memories of the websites, you have visited till now. You can thereby prevent your browser from accessing a blocked site through saved settings. So, follow the steps below to flush the DNS.

Press the ‘Command’ and ‘Space’ keys simultaneously to open the Spotlight.

Type ‘Terminal’ into the Spotlight and let Mac search your Mac for the Terminal application.

Choose Terminal, that is the first option at the top of the Spotlight results.

Then, copy and paste the ‘sudo killall -HUP mDNSResponder; say DNS cache has been flushed’ command and click on the ‘Return’ icon.

If asked, then enter the password that you use while logging into your Mac.

When the DNS flush process is complete, close your web browser.

Then, launch the web browser again and see whether you can connect to any DNS error locked pages or not.

Methods 2: Install a Browser Extension

Like many browser extensions, Safari allows you to install user-made extensions or add ons. You can thereby adjust the browser behavior as per your browsing needs. So, search for your browser’s extension store for block and filter websites. Or else, search your browser extension store for those apps that are meant for blocking websites. Open your browser and go to apps settings to add the sites you would like to block. Before doing this, check the review before installing an extension. Otherwise, untrustworthy extensions might introduce malware into the system.

Method 3: Adjust the Router Settings

You can block sites on your router to prevent your Mac from accessing those sites. To do so, go to ‘System Preferences’ and choose ‘Network’. Then, click on ‘WiFi’ and navigate to the ‘TCP/IP’ tab. Copy the IP address listed next to your router and paste it into the address bar of your browser. Your Mac will display the router settings where you need to provide both the username and password for logging into your router. For any difficulties, check the default password for your router model. ‘Admin’ and ‘Password’ are the default username and password for routers in general. Find out the site blocking options in your router settings and select the specific websites. Note that there is a different set of options for each brand of router. But, most of the routers allow users to block sites in an ‘Access’ or ‘Context’ menu.

There is no easy way to block a website on Safari Mac without parental controls. If you have gone through this article thoroughly, then you will easily know how to block a website on Safari Mac.