Blocking social media takes about ten minutes and works at three levels: the browser, the operating system and the phone. Most people only need the first one. This guide runs through all three in order, so you can stop as soon as the block holds.
Before you start
You need a computer with a web browser, and administrator rights on that computer if you want to use the system-level method in step 6. For the phone steps you need the device itself; nothing has to be installed.
Set aside five minutes for the browser method, or fifteen if you work through every level. None of this is permanent, and every step here can be undone in under a minute.
Step 1: Write down the sites that actually cost you time
Open a note and list the domains you lose time to, using the exact addresses you type. Most people can name three or four honestly, and the list is usually shorter than they expect.
Be specific about which ones matter. Blocking everything on the first attempt is the single most common reason people uninstall their blocker by day three.
Step 2: Install a blocking extension in your browser
Open your browser's extension store, search for a website blocker or social media blocker, and install one. A browser extension is the right starting point because it is the fastest to set up and the easiest to reverse.
MonkeyBlocker is one option and runs in Chrome and other Chromium-based browsers. It works locally without an account, which also means its settings do not automatically carry over to a second computer. StayFocusd, Freedom and Cold Turkey are the other names you will run into; a side-by-side look at what separates them sits in Best Website Blockers for Focused Work.
Step 3: Add your list to the extension's block list
Paste the domains from step 1 into the extension's block list, one per line. Add the mobile subdomain of each site as well, because m.facebook.com and facebook.com are different addresses and a block on one does not cover the other.
The mechanics of this in Chrome are covered on the Website Blocker for Chrome page, and the social-media-specific setup on the Social Media Blocker for Chrome page.
Step 4: Put the block on a schedule
Set the block to activate during the hours you actually need to concentrate, rather than all day. A block that fires at 9 a.m. and lifts at 6 p.m. survives far longer than one that never lifts, because it does not force you to choose between the tool and a normal evening.
MonkeyBlocker calls this Smart Schedules: a hard block can be placed on a schedule, per-site time limits can be combined with it, and the rules relax automatically outside the configured hours. The setup is documented on the website time limit page. This is browser-level scheduling on the computer where you set it, not a system-wide or cross-device schedule.
Step 5: Decide how much of YouTube you want blocked
Add youtube.com to the same block list if you want it gone during study or work sessions. For most people that is the right call while a deadline is live.
If YouTube is also where you study, block the feed rather than the site. The home feed, recommendations and Shorts are what pull you sideways; a video you searched for deliberately usually does not. Hiding or limiting Shorts specifically is covered in Block or Hide YouTube Shorts in Chrome.
Whichever you choose, schedule it the same way as step 4 so it lifts when your session ends.
Step 6: Block at the system level if the browser block is not enough
Edit your computer's hosts file to point distracting domains at your own machine, which stops them resolving in every browser at once.
The file lives at C:\Windows\System32\drivers\etc\hosts on Windows and at /etc/hosts on macOS and Linux, and you have to open it with administrator or sudo rights. Add one line per domain in the form 127.0.0.1 www.example.com, save, then flush the DNS cache: ipconfig /flushdns on Windows, or sudo dscacheutil -flushcache followed by sudo killall -HUP mDNSResponder on macOS.
Two things to know before you do this. The hosts file has no wildcard support, so every subdomain needs its own line. And it is a blunt instrument with no schedule and no timer, so anyone who can edit a text file can undo it in seconds. Treat it as friction, not as a lock.
Step 7: Set limits on your phone
Use the built-in tools rather than installing anything. On iOS, Screen Time offers app limits for social apps and a web content section where you can add sites to a never-allowed list. On Android, Digital Wellbeing offers app timers and a focus mode that pauses selected apps. The exact menu wording shifts between operating system versions, so search the settings app for "screen time" or "digital wellbeing" rather than following a fixed path.
Then move the apps off your home screen. The reach for the phone is usually muscle memory rather than a decision, and putting the icon three swipes away interrupts it before the block has to.
Step 8: Decide what you will do instead
Pick one thing you will do when you hit the block page and write it on a sticky note: stand up, refill your water, open the document you were avoiding. This is the step people skip, and it is the reason blocks get disabled.
The urge that sent you to the feed does not disappear when the site does. It goes looking for a different outlet, and if you have not chosen one, it will pick for you.
Common mistakes and how to avoid them
Blocking the desktop domain only. Add every variant: the bare domain, the www version and the mobile subdomain.
Blocking too much on day one. Start with the three sites from step 1. An over-broad block gets removed entirely rather than trimmed.
Relying on a method you can undo in one click. If you disable the extension every afternoon, add the schedule from step 4 or the hosts file from step 6 on top of it.
Treating the block as the whole plan. No blocker on any platform is impossible to get around, and none of them is meant to be. The block buys you the few seconds in which you can make a different decision.
Never revisiting the list. Distraction moves. The site that cost you two hours last spring may not be the one costing you two hours now.
Frequently asked questions
What are the best ways to block social media websites? A browser extension for everyday use, the hosts file when you want the block to apply outside the browser, and the phone's built-in screen time tools for mobile. Combining two of the three is usually enough.
How can I block Facebook and Instagram specifically? Add facebook.com, www.facebook.com, m.facebook.com, instagram.com and www.instagram.com as separate entries. Blocking the bare domain alone leaves the mobile version reachable.
Are there browser extensions that help block social media? Yes, and they are the fastest route in. MonkeyBlocker, StayFocusd, Freedom and Cold Turkey all cover browser-level blocking with different amounts of configuration.
How do I block YouTube while studying? Either add youtube.com to your block list for the length of the session, or leave search available and block the home feed, recommendations and Shorts, which is what most people are actually losing time to.
Can I temporarily unblock sites if necessary? Yes. Extensions let you pause or end a session, and a scheduled block lifts by itself outside its configured hours. The hosts file has to be edited back by hand.
What are the benefits of blocking social media for focus? The practical benefit is that the site stops being one keystroke away, which removes the automatic check. What you do with the recovered attention is a separate question and worth planning for.
Does blocking social media require special software? No. The hosts file and the built-in phone settings need nothing installed. Extensions are simply faster and easier to schedule.
Can I block social media on all my devices? Not with a single switch. Each device needs its own setup, and browser extensions that work locally do not carry their settings to a second computer on their own.
What to do next
Run the block for a week before you change anything, then look at what leaked through and add only those addresses.
If you want to go further into why the pull is strong in the first place, the social media articles cover the habit side rather than the technical side, which is the half that decides whether any of this sticks.