Guides
AdSense in a WebView App: Is It Allowed, and What Must the App Do First?
Your site earns from AdSense and you want it as an app. Google allows ads in a web view only under set technical conditions. Here they are, with a test to run, checked November 2026.
AdSense in a WebView app is allowed only if the app meets Google's technical requirement: for a web view, that means integrating the WebView API for Ads, which registers the web view with the Google Mobile Ads SDK. Wrapping a site that carries AdSense code and doing nothing else does not meet it. Google also lists Chrome Custom Tabs and Trusted Web Activities as supported ways to show these ads in an Android app. Checked November 2026.
Does Google allow AdSense in a WebView app?
The AdSense Program policies, last updated August 4, 2026, have a section on technical requirements for web content viewing frames in apps. It says app developers who want to earn from AdSense or Ad Manager ads through such a frame must use one of the listed integration options.
You may also read that AdSense is never allowed in apps. The same policy page does say ads may not be integrated into a software application, a rule it marks as not applying to AdMob. Read that alone and the answer looks like a flat no. The later section on app viewing frames sets out the supported routes. Treat those routes as the conditions, not as a loophole.
| How the app shows your pages | Listed as supported on Android? | What it takes |
|---|---|---|
| WebView with the WebView API for Ads | Yes | A change in the app's code and build |
| WebView with no ads SDK registration | No | Fix the app, or do not serve AdSense inside it |
| Trusted Web Activity | Yes | An app built as a Trusted Web Activity, not a plain web view |
| Chrome Custom Tabs | Yes | Pages open in a browser-powered tab |
| AdMob banner next to a web view | Covers AdMob and Ad Manager in-app ads, not AdSense code | Google Mobile Ads SDK in the app, plus other program policies |
If you are weighing a Trusted Web Activity against a web view, our PWA vs WebView app comparison explains the two approaches.
How do I know whether this affects my app?
- Your site shows AdSense or Ad Manager ads and your app displays those same pages: yes, check the integration.
- Your site has no ad code at all: this requirement does not apply to you.
- Ads appear only on some templates, such as blog posts: it still applies if app users can reach those pages.
- A plugin or theme inserts ads automatically: open your page source or plugin settings, because you may be serving ads you forgot about.
- You do not know what your app builder does: assume nothing and ask, using the questions below.
What does the app need for the WebView API for Ads?
This is work inside the Android app. Editing your website cannot do it. Google's Android guide to the WebView API for Ads, last updated November 26, 2026, lists these steps for the legacy Google Mobile Ads SDK:
- 1
Add the SDK
Google Mobile Ads SDK version 20.6.0 or later, on Android API level 21 or higher.
- 2
Add the manifest entry
A meta-data tag named com.google.android.gms.ads.INTEGRATION_MANAGER with the value webview. Google says the SDK throws an IllegalStateException at app start if you skip it and have not provided an application ID.
- 3
Set up the web view
Google's sample turns on third-party cookies, JavaScript and DOM storage, and lets HTML video play without a tap.
- 4
Register it
Call MobileAds.registerWebView() on the main thread, as early as possible, for each web view instance.
- 5
Test it
Load Google's test page inside that web view before relying on your own pages.
That guide now carries a notice that this SDK is in maintenance mode and points developers to the newer GMA Next-Gen SDK, which has its own version of the instructions. A developer starting today should read that notice first.
How can I test whether my app is set up correctly?
Google publishes a WebView API for Ads test page. Its guide says the page shows green status bars when the integration succeeds. The important part is where the page opens.
- 1Get the test page to load inside your app's own web view. One way is a throwaway test build whose website address is the test page.
- 2Confirm it did not open in Chrome or another browser. Many apps send outside links to the browser, and a result from there tells you nothing about your app.
- 3Read the status bars. Anything other than green means do not count on the integration.
- 4Repeat on the release build you plan to upload, not only on an early test copy.
- 5Then open your own pages with ads in the app and check that they load and that nothing overlaps buttons or menus.
Do not tap your own ads to see whether they work. The AdSense policies prohibit clicking your own ads for any reason.
What else has to change besides the code?
Consent
Google notes that the WebView API for Ads does not pass consent collected in the mobile app over to the ad tags in your web view. If visitors from places that require consent use your app, check that your site's consent banner actually appears and saves its choice inside the app, and speak to your consent tool's provider.
The Play Console ads declaration
Google Play asks every app to declare whether it contains ads, under the app content section of Play Console. If people see banner or display ads in your app, answer yes. Apps that contain ads get a Contains ads label on the store listing, and Google says misrepresenting this can lead to suspension.
Ads also tend to involve data collection, so review your answers in the Data safety form for a WebView app. An ads declaration does not make a thin app acceptable either; see why Google Play rejects WebView apps.
What should I ask my app builder?
- Do your apps register the web view with the Google Mobile Ads SDK using the WebView API for Ads?
- Which SDK is used, the legacy one or the Next-Gen one?
- Can I run Google's test page inside a trial build?
- Do outside links and ad clicks open in the browser or inside the app?
- If you do not support it, how do I keep AdSense code from loading inside the app?
On the last question, hiding ad slots with CSS is not a fix we would rely on: the ad code can still run even when you cannot see the box. The cleaner choice is for your site not to output the ad code to app visitors at all, if your setup lets it tell them apart.
What if my builder cannot support it?
You have three honest options: pick a tool or developer that can integrate the API, build the app as a Trusted Web Activity if your site qualifies, or launch the app without AdSense and keep ads for the browser. Which is right depends on how much of your income the ads provide and how much of your traffic would move into the app. Free converters can add a separate complication with their own ads, covered in what free website to APK converters don't tell you.
Frequently asked questions
- Can I use AdSense in an Android WebView app?
- Yes, with a condition. Google's AdSense Program policies require apps showing AdSense through a web view to use the WebView API for Ads. Chrome Custom Tabs and Trusted Web Activities are the other listed options on Android. Checked November 2026.
- Do I need AdMob instead of AdSense for a website app?
- Not necessarily. The WebView API for Ads is meant for web content that already uses AdSense code or Google Publisher Tag. AdMob and Ad Manager in-app ads are a separate route that uses the Google Mobile Ads SDK.
- Can I add the WebView API for Ads by editing my website?
- No. The registration call and manifest entry are part of the Android app, so the app has to be changed and rebuilt.
- How do I test the WebView API for Ads?
- Load Google's test page at google.github.io/webview-ads/test inside your app's web view. Google says it shows green status bars when the integration works. A result from Chrome does not test your app.
- Do I have to declare ads in Play Console if the ads come from my website?
- If users see ads inside your app, declare that the app contains ads. Google asks every app to answer this under app content and may verify it.