Blocking Facebook on a home or office network
Find which domains an app really uses, then block them at the router or with DNS filtering.
From the archive: first published on mohamedsharaf.net in June 2014. Rewritten and checked in 2026; some details may be out of date.
Blocking one website for a whole network sounds simple until you realise an app talks to many domains. The approach that works:
1. See what the app actually contacts
A DNS query viewer (on Windows, NirSoft’s DNSQuerySniffer; on a router, its DNS log) shows every domain requested in real time. Open the app and watch the list.
2. Block those domains
For Facebook and Messenger the main ones are facebook.com, facebook.net, fbcdn.net, fbsbx.com and messenger.com. Add them to your router’s blocked sites, or better, use a DNS filtering service or a Pi-hole, which block a domain and all its subdomains.
3. Close the side doors
Browsers and phones can use encrypted DNS (DNS over HTTPS), which skips your router’s DNS entirely. If the block must hold, turn that off on managed devices, or use a filtering service that also blocks known DoH providers. And be fair: on a shared network, tell people what is blocked and why.