Choose what to block
Compares the places a blocker can sit, from the hosts file to a DNS resolver to a browser extension, and shows where each one leaks. It ends with a short written boundary you can build against.
A gambling blocker is a small program that refuses to open gambling websites or apps on a device you control. It does not cure anything and it cannot see every door, but it turns an instant tap into a delay, and a delay is often enough for an urge to pass.
These pages are written for a beginner developer who wants to build such a blocker for themselves or for someone close to them. They cover the decisions that come before code, the code itself, the ways a blocker fails, and the human support that no filter can stand in for.
Most abandoned blocker projects fail at the planning stage, not in the editor. The person starts with a blocklist, discovers a bypass on day two, and concludes the whole idea is pointless. Deciding what the blocker is for, and what it is allowed to miss, protects the project from that spiral. Work through these points in order and write the answers down before opening a code editor.
The scope page expands each of these decisions into the trade-offs between blocking layers.
Gambling can cause real harm: debt, strained relationships, sleep loss, anxiety and a sense of secrecy that is exhausting to maintain. None of that is a personal failing, and help is available. In the UK, GamCare offers confidential support, and many countries run similar national services; a doctor or local health service can point you to the right one where you live. A blocker is a tool that adds friction; it works best alongside a conversation with someone you trust and, where gambling has already caused problems, support from a qualified professional. Nothing on this site is personal medical, financial or legal advice.
The safer choices page describes the safeguards that sit outside your code: self-exclusion schemes, bank-level gambling blocks and what to do when the blocker fires and the urge is still there.
A blocker is only as good as its weakest part. The four pages below are written so that you can read them in order on a first pass, then return to each one as a reference while you build.
Compares the places a blocker can sit, from the hosts file to a DNS resolver to a browser extension, and shows where each one leaks. It ends with a short written boundary you can build against.
Ordered implementation steps with short code excerpts: a blocklist format, a domain-matching function, an extension rule and a disable delay. Each permission the code needs is explained in plain terms.
How to test a blocker without ever loading a real gambling site, which bypasses to try on purpose, what to log and what never to log, and how to maintain the list without weakening it.
Why friction works, how to recognise when gambling is doing harm, and the safeguards that exist outside your code: self-exclusion, bank blocks, trusted people and professional services.
No. New domains appear constantly, mirror sites change names, and a determined person can always find another device or network. A blocker is a speed bump, not a wall. Its value lies in interrupting the automatic path from urge to wager, which is why pairing it with human support matters more than chasing a perfect list.
A first version needs only the ability to edit a text file with administrator rights and to follow a short checklist. A browser extension or a local DNS resolver asks for more, but still sits comfortably within a beginner's reach when built one step at a time.
Add a waiting period before any disable request takes effect, typically measured in days rather than minutes, and consider requiring a second person to confirm. The point is that switching it off should take longer than the urge lasts.
Start with the sites you or the person you are helping actually use; that short list blocks most of the real risk. Public blocklists for content filters exist and can be reviewed and merged, but treat them as a starting point to check rather than a finished product.
Work through the full list of questions, including mobile coverage, logging and how a blocker fits with self-exclusion.
Cookies on this site
We use necessary cookies to run the site and, with your consent, optional ones to measure visits. You can change this at any time. Cookie policy