webfilteringdatabase.com
Home Find Your Solution
Features
Domain Categorization API Real-Time Classification 59 Filtering Categories Offline Database (120M) Managed DNS Filter ML Classification Content Classification
Industries
K-12 Schools Corporate Healthcare Government ISPs
Tools
Domain Lookup Bulk Categorization Category Explorer
Resources
Pricing API Documentation Login / Sign Up
Home / Block guides / Android

How to Block Websites on Android

Android has no editable hosts file, but it has something better for most people: Private DNS, which filters every app on Wi-Fi and mobile data. Add Family Link for children and device management for company phones, and you have a block that holds.

4methods compared
Android 9+for Private DNS
Wi-Fi + mobilewith one setting

Pick the right method

Start with whose phone it is. A parent setting up a child's phone, an adult blocking distractions and an IT admin managing a fleet each need a different first step.

Your own phonePrivate DNSOne setting, every app, every network. Choose categories in the filter.
A child's phoneFamily Link plus Private DNSChrome site controls and app approvals, with DNS filtering for everything else.
Every device at homeRouter DNSCovers phones on Wi-Fi plus TVs and consoles. Add Private DNS for mobile data.
Company phonesAndroid Enterprise MDMLocked browser policies, managed DNS and app control on company owned devices.

Menu names on Android vary more than on any other platform, because each phone maker adds its own settings layout on top. Where a step below does not match your phone, use the search bar at the top of Settings and type the name of the option. Keep the phone updated as well, since older Android versions lack some of these settings.

Android blocking methods compared

Each method works at a different layer. The table shows what traffic it sees, whether it understands categories, and the usual way around it.

MethodAll browsers and appsMobile dataCategoriesWho can turn it offUsual bypass
Private DNSYesYesYes, with a category filterThe phone's user, unless managedVPN apps, changing the setting
Family Link site controlsChrome onlyYesExplicit site filter plus listsParent onlyOther browsers, in-app browsers
Router DNSYes, on that Wi-FiNoYesRouter adminMobile data, VPN, other Wi-Fi
Android Enterprise MDMManaged browsers, plus DNSYesYes, with a filter serviceIT admin onlyPersonal devices outside management
Filter or parental control appUsually, via a local VPNYesDepends on the appDepends on lock settingsUninstalling, a second VPN

Why no hosts file? On Android the hosts file is a protected system file. Editing it requires rooting the phone, which weakens its security. Private DNS gives you the same blocking power without that risk.

Method 1: block websites with Private DNS

Private DNS sends every lookup from the phone to the provider you choose, encrypted, on Wi-Fi and mobile data. Point it at a category filter and blocked sites stop loading in every browser and app.

Many Android phonesSettings, Network & internet, Private DNS. On some versions it sits under an Advanced section.
Many Samsung phonesSettings, Connections, More connection settings, Private DNS.

Before you start

  • Android 9 or later
  • The filter's Private DNS hostname, not an IP address
  • Your category choices ready in the filter dashboard
  • For a child's phone: Family Link set up first
Open Settings and search for Private DNS

The search bar is the fastest route, since menu paths differ between phone makers and Android versions.

Choose the provider hostname option

The three choices are usually Off, Automatic and Private DNS provider hostname. Select the third.

Enter the hostname from your filter

Type the hostname exactly as given. The Save button only works with a valid hostname.

Save and test

Visit a site in a blocked category on Wi-Fi, then switch to mobile data and try again. Both should show a block.

Check Chrome's own secure DNS setting

In Chrome's privacy and security settings, secure DNS can use its own provider. Set it to use the current provider so the filter applies.

Read more about how encrypted DNS interacts with filters in DNS over HTTPS and web filtering.

Method 2: Family Link for a child's Android phone

Google Family Link lets a parent manage a child's Google account and Android device. Its website controls apply to Chrome when the child is signed in.

Allow all sitesNo Chrome site filtering. Use only when DNS filtering does the work.
Try to block explicit sitesGoogle's filter for sexually explicit and violent content. Not perfect, as Google itself notes.
Only allow approved sitesThe child can only visit sites you add. Best for young children.

Also set in Family Link

  • Approval for new app installs, so other browsers and VPN apps need your yes
  • Content ratings for the app store
  • Screen time limits and bedtime
  • Blocked site requests come to your phone
Open Family Link on the parent's phone

Select the child. Recent versions put site settings under Controls, then Content restrictions, then Google Chrome.

Choose a filter level

Pick one of the three levels above.

Manage sites

Add approved or blocked sites. A domain entry covers the domain's other addresses; a single site entry does not.

Require approval for apps

Without this, a second browser installed from the store would not follow the Chrome settings.

Add Private DNS for everything else

DNS filtering covers in-app browsers and other apps that Family Link's Chrome settings do not.

For which categories families usually block at each age, see parental controls filtering and screen time app and website categories.

Method 3: block on the router for every device at home

Setting a filtering DNS server on the home or office router covers every Android phone on that Wi-Fi, plus devices that have no settings of their own, such as smart TVs and consoles.

Covers

Every phone, tablet and gadget on your Wi-Fi, with one change in the router.

Misses

Phones on mobile data or other Wi-Fi networks. Pair it with Private DNS on those phones.

Works with Private DNS

If a phone uses Private DNS, its lookups go to that provider, not the router. Point both at the same filter so the rules match at home and away.

Protect the router

Change the router's admin password and turn off remote admin, or anyone on the Wi-Fi can remove the DNS setting in a minute.

Step by step instructions are in how to block websites on a router.

Method 4: Android Enterprise for company phones

Organizations manage Android phones through Android Enterprise with an MDM. Fully managed, company owned devices give IT the most control; work profiles on personal phones give much less.

PolicyWhat it doesWhere it applies
Chrome managed configurationPushes a URL block list and allow list to Chrome, including a block everything plus allow list setupChrome approved through the managed app store
Chrome secure DNS policiesControls Chrome's own encrypted DNS so it cannot skip the filterManaged Chrome
Private DNS policySets and locks a Private DNS hostname on the deviceCompany owned devices on recent Android versions; check your MDM's support
App allow listsStops users installing other browsers or VPN appsMost reliable on fully managed or dedicated devices
Always on VPN for a filter appRoutes traffic through a filtering app that users cannot turn offManaged devices

Support for each policy differs between MDM products and Android versions, so confirm the details with your MDM provider. Our article on MDM web content filter data explains how category data plugs into these setups.

How Android website blocks get bypassed

These are the routes around Android filtering that come up most often, and how to close each one.

VPN apps

When a VPN is on, lookups usually go through it, past Private DNS. Require app approvals and block the VPN / Proxy category. See how to block VPN apps.

Changing Private DNS

On an unmanaged phone the user can switch it off. Device management can lock it; for children, keep the conversation open and check it regularly.

Another browser

Family Link's site controls cover Chrome. App approvals stop new browsers; DNS covers the rest.

Browser secure DNS

Some browsers can use their own encrypted DNS provider. Point them at the current provider or manage the setting.

In-app browsers

Social and chat apps open links inside themselves. Chrome settings do not apply there, but DNS filtering does.

Mirror and proxy sites

Blocked sites move to new domains. Category filtering with daily updates catches most of them. See blocking proxy sites.

Troubleshooting Android blocks

If a site still loads, check the network path and the app before adding more entries to a list.

SymptomLikely causeWhat to do
Blocked on Wi-Fi, open on mobile dataOnly the router filters; Private DNS is offSet Private DNS on the phone
Blocked in Chrome, open in another browserFamily Link site controls only cover ChromeRequire app approvals, add DNS filtering
Private DNS shows "couldn't connect"Hostname typed wrongly, or the network blocks encrypted DNSCheck the hostname; try another network to compare
Website blocked, app still worksThe app uses other domains than the websiteBlock the related domains or the category, or limit the app
Filter suddenly stopsA VPN app is activeCheck Settings for VPN, remove it, block installs

Recommended Android setups

One method rarely covers everything. These combinations hold up well in practice and take less than an hour to set up.

Child's first phoneFamily Link with Only allow approved sites or the explicit site filter, app approvals on, Private DNS set to a category filter blocking Adult, Gambling, Dating and VPN / Proxy, and SafeSearch forced.
Teenager's phoneFamily Link with the explicit site filter and app approvals, Private DNS blocking adult and harmful categories, and social or gaming categories on a school night schedule.
Adult focus or work phonePrivate DNS on a filter that blocks Malware / Phishing / Suspicious plus any distraction categories you choose, such as Social Networking during working hours.

Shared tablets and guest phones

A family tablet often has several users. Android supports separate user profiles on many tablets, but site settings differ per profile, so a router DNS filter is the simplest way to give every profile the same baseline. Guest phones on your Wi-Fi follow the router too; a separate guest Wi-Fi with its own filtering keeps visitors' devices apart.

Test after every change

Wi-Fi and mobile data

Open a blocked site on Wi-Fi, then turn Wi-Fi off and try again on mobile data.

Every browser

Try Chrome, any other installed browser, and a link opened from a messaging app.

Sites that must work

Check school, work, maps and banking sites still load without errors.

The filter's log

The blocked lookup should appear in the activity log within moments. If nothing appears, the phone is not using the filter.

Category blocking on Android

Family Link's lists and a router's block page only know the sites you add. A category filter looks every domain up in a database, so a gambling site launched this morning is blocked the first time it is visited, as long as it has been categorized.

Coverage120 million domainsThe 20 million most visited cover 99.99% of web traffic and usage.
Freshness300,000 new domains a dayRechecked after a week and after a month as content appears.
Choice59 categoriesFrom Adult and Gambling to Social Networking, Gaming and AI / LLM Tools.

See how to block websites by category for the full approach, and look up any site with the domain lookup tool.

Private DNS or a filtering app?

Many parental control and filter apps on Android work by creating a local VPN on the phone and inspecting traffic there. That is a different approach from Private DNS, with its own trade offs.

Private DNS

Built into Android, nothing to install, very light on the battery. It blocks at the domain level and depends on the user not changing the setting.

Filter app with a local VPN

Can add per app rules and reports on the phone. It occupies the phone's single VPN slot, so a second VPN app cannot run alongside it.

Which to choose

For most households Private DNS plus Family Link is enough. Apps make sense when you need per app time rules beyond what Family Link offers.

Where the data matters

Both approaches are only as good as the category data behind them. App makers can license ours; see category database for parental control apps.

Our managed DNS filter for Android

Our managed DNS filter runs on the same database we license to security vendors. Point the router at it, or give each Android phone a private encrypted link for Private DNS that works on Wi-Fi and mobile data.

Categories per profile

Stricter categories for children's phones, lighter ones for adults. See profiles and networks.

Schedules

Social networking and gaming off during homework or work hours.

SafeSearch

Safe search results and restricted video modes forced at the DNS level.

Reports

Activity logs and monthly reports of what was blocked.

Android website blocking FAQ

How do I block a website on Android without an app?

Set Private DNS to a filtering provider's hostname in the network settings. It works on Wi-Fi and mobile data and blocks the categories you choose in the filter. For a child's account, Family Link can also block named sites in Chrome.

Where is Private DNS on my Android phone?

On many phones it is under Settings, Network & internet, Private DNS. On some Samsung phones it is under Connections, More connection settings. If you cannot find it, search for Private DNS in the Settings search bar. It needs Android 9 or later.

Does Family Link block websites in every browser?

Family Link's site filters apply to Chrome when the child is signed in with their supervised account. Other browsers are not filtered by those settings, so require approval for new apps or use a DNS filter that covers every browser.

Can I type an IP address into Android Private DNS?

No. Private DNS takes a hostname, such as the one your filtering provider gives you. An IP address will not be accepted.

Does a VPN bypass Private DNS on Android?

Often, yes. When a VPN is active, lookups usually go through the VPN's own DNS. Block VPN apps through app approvals or device management and block the VPN / Proxy / Anonymizers category.

Can I edit the hosts file on Android?

Not on a normal phone. The hosts file is a protected system file that needs root access, which weakens security and is not recommended. Private DNS does the same job more safely.

Other device guides: iPhone and iPad, Chromebook at home and Windows 11.

Filter Android phones by category

Tell us how many phones and networks you manage. We will suggest a setup, or a database licence if you build your own app.

Talk to us

Android, Chrome, Google Family Link and Android Enterprise are trademarks of Google LLC. Samsung is a trademark of Samsung Electronics Co., Ltd. They are named only to identify the products discussed. Web Filtering Database is not affiliated with, sponsored or endorsed by these companies.