AdMob app-ads.txt: how to set it up for your app
app-ads.txt is a plain text file listing who is allowed to sell ads in your app. It's an IAB Tech Lab standard that extends ads.txt to apps. AdMob warns that without it you risk "a significant loss in ad revenue": ad buyers that support app-ads.txt only buy inventory in apps with a verified file.
How AdMob finds your file
- It reads the developer website from your store listing — on Google Play under Store settings › Store listing contact details, on the App Store from the Marketing URL.
- It requests
/app-ads.txtat the root of that domain, over HTTPS and then HTTP.
Rules that trip people up:
-
www.andm.are dropped: forhttps://www.example.com/gameAdMob checksexample.com. - Only one subdomain level is checked: for
support.help.example.comit trieshelp.example.com, thenexample.com. - Redirects are followed, so the root domain can redirect to where the file actually lives.
- The file must return HTTP 200. Google Sites can't host it.
- If your
robots.txtblocks crawlers, allowGoogle-adstxt. - The app must be published.
What goes in the file
In AdMob, open Apps › View all apps › app-ads.txt › How to set up app-ads.txt, and copy your line — it contains your publisher ID. It looks like this:
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0 If you use mediation, add a line from each network too. Save it with a plain text editor — rich text editors can add invisible characters that break parsing.
Checking it
- Open the URL in a browser. If the file shows, AdMob can most likely find it.
- Verification takes up to 24 hours, sometimes a few days for low-traffic apps.
- In AdMob › Apps › View all apps › app-ads.txt, green means verified, grey means no file found and red means a problem ("Your revenue is at risk").
Common errors
- The store listing has no developer website, or the URL is invalid.
- The file is on a subdomain AdMob doesn't check (see the rules above).
- Missing or wrong publisher ID, or the wrong domain (
admob.cominstead ofgoogle.com). - You recently changed the developer website: allow a week before asking AdMob support.
To check an existing file, run it through the free app-ads.txt checker: it looks for the file where AdMob looks and checks every line.
Don't have a website?
StoreOK hosts app-ads.txt for free at yourapp.storeok.dev/app-ads.txt. Set https://yourapp.storeok.dev as the developer website in both stores, paste your AdMob line, and the file is served from the root of that domain over HTTPS and HTTP.
Originally published on StoreOK. Checked against the official Apple / Google pages on 2026-11-27 — store rules change, so verify before you rely on it. Not legal advice.
Want to see what your own app needs to declare? Scan your dependency file — it runs in your browser, no signup.
原文:https://www.a8q9.cn/en/article/admob-app-ads-txt-how-to-set-it-up-for-your-app-e23f25.html