Safari: Block individual websites - how it works
In our instructions, we show you step by step how to block individual websites in the Safari browser on Mac OS.
Lock pages in Safari
Safari has no special function for blocking individual websites. With a little detour, however, it works quite easily:
- Open the terminal via "Applications"> "Utilities".
- For security reasons, first make a copy of your hosts file by entering the command "cp / etc / hosts ~ / Desktop / hosts.txt" (without quotes). Then confirm this with the Enter key.
- Now enter the command "sudo pico / etc / hosts" (without quotes). Enter your administrator password when prompted and confirm with the [Enter] key.
- The host file now opens after entering the password. Scroll down to the end of the file.
- In a new line, enter the IP address 127.0.0.1 followed by a space and the website URL to be blocked. If you want to block several pages, use a new line for each website.
- When you have entered all websites, press [Ctrl] + [O] and then the [Enter] key. Make sure the file has been saved.
- All you have to do in the terminal is empty the DNS cache. To do this, enter the command "sudo dscacheutil -flushcache" (without quotes).
- The pages you have entered are now blocked and can no longer be accessed via Safari.
Mac tip: In this practical tip we will show you how to have your Mac boot up automatically.