How to create an app-ads.txt file for Google AdSense

AdSense monetizes websites (ads.txt); for apps Google’s products are AdMob and Ad Manager. The line format is the same — here is how to set up app-ads.txt for Google.

Steps

  1. Find your publisher ID: in AdMob open Settings → Account information and copy the Publisher ID (pub-XXXXXXXXXXXXXXXX). AdSense shows its own pub- ID in Account → Settings → Account information.
  2. Write the line: google.com, pub-XXXXXXXXXXXXXXXX, DIRECT, f08c47fec0942fa0
  3. Add the lines of every other network you use in the same file (mediation networks too).
  4. Upload the file to the root of the developer website from your Google Play / App Store listing: https://yourdomain.com/app-ads.txt.
  5. In AdMob open Apps → View all apps → app-ads.txt and check the status; Google re-crawls the file regularly, so verification can take a day or more.

Open the free app-ads.txt generator

The Google line

google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

Use the pub- ID of the account that actually serves ads in the app. If your web (AdSense) and app (AdMob) accounts differ, each file gets its own ID.

If Google says “not found” or “not verified”

See fix app-ads.txt not found — usually the developer website in the store listing doesn’t match the domain with the file, or the file returns an HTML page.

FAQ

Does AdSense need app-ads.txt?

AdSense is for websites and uses ads.txt. Apps monetized by Google use AdMob (or Ad Manager), which checks app-ads.txt on the developer website.

What is Google’s certification authority ID?

f08c47fec0942fa0.

Related guides

All app-ads.txt guides

More