How to Block Specific Websites During Study Sessions

Blocking specific websites while you study is one of the most effective things you can do for your focus. It removes the option of distraction entirely, so you don't have to rely on willpower to resist checking social media, news, or video sites during a session.

There are three main approaches, and the right one depends on how much control you need.

Browser extension blocking

The fastest option. Install a website blocker extension in your browser, add the sites that distract you most, and set a schedule that matches your study time. Most free options let you create a custom block list and set automatic timers. Some include a "lockout" mode that prevents you from disabling the block during an active session — use this if you know you'll be tempted to override.

This method takes about 2 minutes to set up and works immediately. The downside is that it only blocks one browser — if you switch to a different browser, the block doesn't follow.

System-level blocking (hosts file)

For something stronger, you can block websites at the operating system level by editing the hosts file. This routes requests for blocked domains to your local machine, making them unreachable in any browser.

On Windows, the file is at C:\Windows\System32\drivers\etc\hosts. On macOS and Linux, it's at /etc/hosts. Add entries like 127.0.0.1 www.distracting-site.com and save. Flush your DNS cache to apply immediately.

This works across all browsers and applications, but it requires admin access and doesn't have automatic scheduling — you'll need to edit the file manually to unblock.

Router-level blocking

If you want to block distracting sites across all devices on your home network — including phones and tablets — configure URL filtering or parental controls on your router. Log into your router's admin panel (usually at 192.168.1.1) and look for access restriction or URL filtering settings.

This is the most comprehensive approach but affects everyone on the network, so it's best if you live alone or can coordinate with housemates.

Which approach should you use?

For most students, a browser extension is the right starting point. It's quick, customisable, and effective for single-device study. If you find yourself working around it, escalate to system-level or router-level blocking.

For a complete guide to all three methods with detailed setup instructions, see our full article on how to temporarily block distracting websites.

Frequently asked questions

Does blocking actually help, or will I just find another distraction?

Blocking adds friction. Even a few seconds of friction is enough to interrupt the automatic habit of typing a URL. Most people find that blocking their top 5–10 distraction sites eliminates the majority of unproductive browsing.

Should I block sites permanently or just during study time?

During study time is usually sufficient. Complete blocking can create frustration and resentment. Use a timed approach: block during study sessions, unblock during breaks.

What about phone apps?

If you block sites on your computer but leave your phone accessible, you've just moved the distraction. Put your phone in another room during study sessions, or use a focus mode that restricts app access.