• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

How to block any Web site on computers and phones to avoid distractions

AnonyViet by AnonyViet
January 29, 2023
in Tips
0

Facebook is a disaster for your productivity or any other social network. Tell yourself to your best friend, it only took “five minutes” to surf, but it turned into an hour or more. If this is the case, the simplest solution is to block distracting websites and other social networks.

I will use two methods to block distracting websites: editing system files and using third-party software. Most people can easily edit files on computer operating systems like Windows, macOS, and Linux. As for mobile phones, you will need to download 3rd party software.

Manually blocking websites requires you to edit your computer’s hosts file. Before DNS, the hosts file was used to associate domain names and IP addresses.

You can use the system’s hosts file to modify domain requests to other servers. This is commonly used in web development to test web pages before they go live. Blocking a website is as simple as modifying requests to 127.0.0.1 or localhost, which is your machine’s IP address. You can use 0.0.0.0 or any other IP address.

The benefit of manually blocking a site is that the site will be blocked until you edit the hosts file again. If you are looking to block Facebook or Twitter permanently on your computer, then this is a great choice. If you want to access these sites again, just edit the hosts file again.

If you still want to access these sites during breaks — for example, at lunchtime or after work — this isn’t so good. Instead, you can use an application that blocks websites of your choice on a schedule or only for a certain period of time.

Although the method of editing the hosts file will vary depending on the operating system you are using, the changes you will make are different. The changes you make also depend on the site you’re trying to block. To block Facebook desktop and mobile sites, you must add the following lines:

127.0.0.1 www.facebook.com

127.0.0.1 m.facebook.com

These lines tell your computer that the domain “www.facebook.com” will be found at 127.0.0.1, which is your computer’s local address (or any wrong IP). No matter what browser you use, your computer will not be able to access facebook because there is no domain name “www.facebook.com” on 127.0.0.1 .

You can use the # symbol to add a description after the domain name, reminding yourself why you’re doing it, for example # block facebook.

The operating system will ignore the content after the “#” sign. So, you can also add “#” to the beginning of the line to remove that command line. For example, when you want to unblock facebook, you just need to do this:

# 127.0.0.1 www.facebook.com

# 127.0.0.1 m.facebook.com

You should add your changes at the end of the hosts file so as not to affect other lines in the hosts file.

Edit the hosts file on Windows

You need to run Notepad as Administrator to be able to make changes to the file system. So you also need an administrator account.

On Windows 10 or 8: Open the Start Menu and type “Notepad”. Right click on “Notepad” and select “Run as administrator”.

Edit the hosts file on Windows

Now press File > Open and open the file c:\windows\system32\drivers\etc\hosts. Now you can block any domain you want using the command I mentioned above. When done, press File > Save to save your changes.

save the hosts file to block the website

On Windows 7: Click Start Menu, and type notepad. Then click once on Notepad in the search box and then hold down Shift + Ctrl + Enter to open notepad with Admin rights. You also make the same changes as Windows 10.8.

Edit the hosts file on macOS

Just like on Windows, you will need to use administrator rights on macOS to make changes. On a Mac, changes will be made using Terminal and the system’s built-in text editor – nano.

First, launch Terminal in Applications > Terminal. Then enter the following command: sudo nano /etc/hosts. Enter your account password, then press Enter, to confirm.

Edit the hosts file on macOSAdd the changes you want at the end of the file and try not to change anything else in the file. Once done, you can save your changes by pressing Control + O.

save hosts macos

If you don’t want to save your changes, use the keyboard shortcut Control + X.

Edit the hosts file on Linux

On Linux, you just need to do the same as on macOS. Both Linux and macOS have a nano text editor and the hosts file is stored in /etc/hosts. Just launch the terminal, and enter the command sudo nano /etc/hostspress Ctrl + O when you’re done.

How to manually block the web on iPhone and iPad

You cannot access the hosts file on iPhone and iPad unless Jailbreak. But Apple also has options to help you block the web.

In addition to blocking anything Apple deems risky, this option also removes private browsing from Safari. For these reasons, this is not a good solution in the long run. Luckily, once it’s set up, you can turn it on and off relatively easily.

To block a specific website on your iPhone or iPad, first turn on Settings (Settings) then tap Screen Time

  • For iOS 14 or higher, follow the instructions: Turn on Restrict -> Turn the ON button on, select Restrict Content -> Web Content -> Limit Adult Web Sites -> Don’t Allow -> Add Web to be blocked.
  • For iOS 13 below, follow the figure below:

How to manually block the web on iPhone and iPad

Continue searching”Content & Privacy Restrictions” (App Limit/Content Limit).

Content & Privacy Restrictions

Enable the option “Content & Privacy Restrictions” at the top of the screen and enter your password if asked.

Content & Privacy Restrictions

Next, tap on “Content Restrictions” > “Web Content“.

Web Content

Now tap on “Limit Adult Websites” and in “Never Allow, you can add any website you want to block. Finally, delete any apps associated with the website you’re blocking (Facebook, Twitter, etc.).

Never Allow

You can turn off blocking quickly by going back to Settings > Screen Time > Content & Privacy Restrictions and turning off “Content & Privacy Restrictions” at the top of the screen.

Block website by app (Including Android)

If you don’t like using a text editor to manually edit your hosts file, and you want to schedule your blocking or you are using an Android device, then you can use 3rd party software.

Blocker app for Android

On Android, Google Family Links gives you the same control as Screen Time on iOS. The app is handy for restricting access to websites and services on children’s devices, but you can also use it to restrict your own devices. If you don’t like the above app, then BlockSite is another popular solution designed to completely block distracting websites.

Application to block the above Website for Windows

A small free app called FocalFilter will allow you to set up a list of websites you want to block, and you can enable the use of this list for a certain period of time. This is the simplest way to deal with distracting websites and it works on Windows 10, 8, 7, Vista and XP.

Application to block the above Website for Windows

If you want something a little more automated, you can learn Cold Turkey (free version available). The free version of this app will allow you to block distracting websites. However, you will need to pay a $39 subscription fee to access advanced features like scheduling and app blocking.

Application to block Web sites on macOS

On macOS you can use the app for free SelfControl to set up a block list, and block those sites for as long as you want. Just like FocalFilter on Windows, it’s simple and effective, but lacks advanced features like the scheduling of the Cold Turkey app (also available for macOS), which costs $39.

Website blocking application on macOS

Application to block Web sites on Linux

Free app Chomper seems to be the best designed tool for blocking websites on Linux. This is a command line tool that is easier to use and simpler than editing the hosts file.

Application to block Website on Linux

You can use Chomper to schedule blocks and quickly switch between different block lists, all with just a few text commands.

Improve your work productivity

Blocking websites can help you improve your productivity. But the temptation is inescapable, especially with mobile apps, which make it easy to waste an entire day.

There are other things you can do to improve your productivity, like using multiple monitors and tweaking your computer.

Tags: avoidBlockcomputersdistractionsphonesSiteweb
Previous Post

Download Tool DDOS PassDDoS 3.5 – Powerful DDos Bypass CloudFlare

Next Post

How to know strangers see my Story on Facebook

AnonyViet

AnonyViet

Related Posts

How to write Shell Script in Linux/Unix
Tips

How to write Shell Script in Linux/Unix

December 6, 2025
How to completely uninstall WSL on Windows 11?
Tips

How to completely uninstall WSL on Windows 11?

December 6, 2025
Kinh nghiệm mua Laptop cho sinh viên nhóm ngành kế toán, kinh tế, xã hội…
Tips

Kinh nghiệm mua Laptop cho sinh viên nhóm ngành kế toán, kinh tế, xã hội…

December 5, 2025
8 tips for more successful PowerPoint presentations
Tips

8 tips for more successful PowerPoint presentations

December 4, 2025
Chrome extensions to improve productivity in 2021
Tips

Chrome extensions to improve productivity in 2021

December 2, 2025
How to create photos that run KPIs while crying using Gemini for the 12 zodiac animals
Tips

How to create photos that run KPIs while crying using Gemini for the 12 zodiac animals

December 1, 2025
Next Post
How to know strangers see my Story on Facebook

How to know strangers see my Story on Facebook

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

How to transfer music from other services to Apple Music, no app required

How to transfer music from other services to Apple Music, no app required

December 8, 2025
How to create Mind Map and Flowchart using ChatGPT is super simple

How to create Mind Map and Flowchart using ChatGPT is super simple

December 7, 2025
Free Gemini Google certification exam guide and Answers

Free Gemini Google certification exam guide and Answers

December 6, 2025
How to write Shell Script in Linux/Unix

How to write Shell Script in Linux/Unix

December 6, 2025
How to transfer music from other services to Apple Music, no app required

How to transfer music from other services to Apple Music, no app required

December 8, 2025
How to create Mind Map and Flowchart using ChatGPT is super simple

How to create Mind Map and Flowchart using ChatGPT is super simple

December 7, 2025
Free Gemini Google certification exam guide and Answers

Free Gemini Google certification exam guide and Answers

December 6, 2025
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

How to transfer music from other services to Apple Music, no app required

How to transfer music from other services to Apple Music, no app required

December 8, 2025
How to create Mind Map and Flowchart using ChatGPT is super simple

How to create Mind Map and Flowchart using ChatGPT is super simple

December 7, 2025
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

trang chủ f168 nhà cái 78win https://www.qq8827.com/

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

trang chủ f168 nhà cái 78win https://www.qq8827.com/

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply