Setting Up app-ads.txt for AdMob: Complete Verification Guide

If you’re monetizing your mobile app with ads, there’s a small but critical file that can make or break your ad revenue: app-ads.txt. I learned this the hard way when my AdMob earnings dipped unexpectedly, and the root cause turned out to be a misconfigured ads.txt file. In this guide, I’ll walk through everything you need to know about setting up app-ads.txt correctly, based on my experience with my Flutter apps.

What Is app-ads.txt?

The app-ads.txt standard is an extension of the IAB Tech Lab’s ads.txt (Authorized Digital Sellers) initiative, adapted specifically for mobile apps. It’s a plain text file hosted on your developer website that declares which ad networks are authorized to sell ad inventory in your apps.

The purpose is straightforward: prevent ad fraud. Without app-ads.txt, bad actors can create fake ad inventory pretending to be your app and siphon off advertising dollars. By explicitly listing your authorized sellers, you give ad buyers confidence that they’re purchasing legitimate inventory.

Google requires app-ads.txt verification for AdMob publishers. While your ads will still serve without it, unverified inventory may receive lower bids from advertisers, directly impacting your eCPM and revenue.

Understanding the IAB Standard

The IAB Tech Lab maintains the app-ads.txt specification. Each line in the file follows this format:

<domain>, <publisher-id>, <relationship-type>, <certification-authority-id>

Let’s break down each field:

  • Domain: The advertising system’s domain (e.g., google.com for AdMob)
  • Publisher ID: Your unique identifier within that ad system
  • Relationship type: Either DIRECT (you have a direct account) or RESELLER (the inventory is sold through an intermediary)
  • Certification authority ID: Optional. The TAG (Trustworthy Accountability Group) ID for the advertising system

For most indie developers using AdMob directly, your file will look something like this:

google.com, pub-XXXXXXXXXXXXXXXX, DIRECT, f08c47fec0942fa0

Finding Your AdMob Publisher ID

Your publisher ID is the foundation of your app-ads.txt file. Here’s how to find it:

  1. Sign in to your AdMob account
  2. Click on Settings in the sidebar
  3. Navigate to Account information
  4. Your Publisher ID is displayed in the format pub-XXXXXXXXXXXXXXXX

Alternatively, you can find it in the AdMob dashboard URL — it’s typically embedded in the URL when you’re logged in.

For my apps, my publisher ID is pub-3594215621243517. This same ID is used across all my apps since they’re all under the same AdMob account.

Setting Up the File Correctly

The file must be named exactly app-ads.txt (lowercase, no variations) and must be accessible at the root of your developer website:

https://yourdomain.com/app-ads.txt

Here’s what my actual app-ads.txt file looks like:

google.com, pub-3594215621243517, DIRECT, f08c47fec0942fa0

Critical Formatting Rules

Getting the format right is essential. Common formatting mistakes can cause verification to fail:

  1. No BOM (Byte Order Mark): Save the file as UTF-8 without BOM. Some text editors add an invisible BOM character at the beginning of the file, which can break parsing.

  2. Unix line endings: Use \n (LF), not \r\n (CRLF). If you’re editing on Windows, make sure your editor is set to Unix line endings.

  3. No trailing whitespace: Remove any extra spaces at the end of lines.

  4. One entry per line: Each authorized seller gets its own line.

  5. Comments are allowed: Lines starting with # are treated as comments.

# Authorized sellers for Atlantis Kid apps
# Updated: 2026-02-01
google.com, pub-3594215621243517, DIRECT, f08c47fec0942fa0

Hosting on Your Developer Website

The app-ads.txt file must be hosted on the website URL that you’ve registered as your developer website in the app stores. This creates the trust chain: the app store listing points to your website, and your website declares which ad networks are authorized.

For my setup, I host a static site on Cloudflare Pages. The deployment process is simple — I just include app-ads.txt in my site’s root directory, and it’s automatically served at the correct URL when I deploy.

my-site/
├── index.html
├── app-ads.txt          # Must be at the root
├── privacy/
│   └── balloon-pop.html
└── ...

Verifying the File Is Accessible

After deployment, verify the file is accessible by opening it directly in your browser:

# Check with curl
curl -I https://yourdomain.com/app-ads.txt

# Verify the content
curl https://yourdomain.com/app-ads.txt

The response should have:

  • HTTP status code 200
  • Content-Type header of text/plain
  • The correct file content with no extra characters

Linking Your Website in App Stores

The connection between your app and your website needs to be established in both directions.

Google Play Console

  1. Go to your app’s Store presence > Store listing
  2. In the Contact details section, enter your developer website URL
  3. This URL must match exactly where your app-ads.txt is hosted

Apple App Store Connect

  1. Navigate to your app’s page in App Store Connect
  2. Under App Information, add your Marketing URL
  3. Ensure this URL points to the same domain hosting your app-ads.txt

AdMob App Settings

In AdMob itself:

  1. Go to Apps > select your app
  2. Under App settings, verify the app store URL is correct
  3. Check that the app is linked to the correct store listing

The Verification Process

Once everything is set up, the verification process involves Google’s crawler checking your app-ads.txt file:

  1. Crawl initiation: Google periodically crawls developer websites listed in app store entries
  2. File parsing: The crawler reads your app-ads.txt and parses each entry
  3. Publisher ID matching: Google verifies that your AdMob publisher ID appears in the file
  4. Status update: Your AdMob dashboard shows the verification status

Timeline

In my experience, the verification timeline varies:

  • Initial crawl: 24-48 hours after your file is first published
  • Full verification: Up to 2-3 weeks for the status to show as verified in AdMob
  • Re-verification: Automatic, happens periodically

Don’t panic if verification doesn’t happen immediately. Google’s crawler operates on its own schedule, and factors like domain age and site traffic can affect crawl frequency.

You can check your verification status in AdMob:

  1. Go to Apps > All apps
  2. Look for the app-ads.txt status column
  3. Status values: Not found, Needs attention, Verified

Common Mistakes and Troubleshooting

Over the past year of managing my app-ads.txt, I’ve encountered (and helped others troubleshoot) several common issues:

“app-ads.txt not found”

Cause: The file isn’t accessible at the expected URL, or the developer website URL in the app store doesn’t match.

Fix: Double-check that https://yourdomain.com/app-ads.txt returns a 200 status. Verify the domain in your app store listing matches exactly (including www vs non-www).

“Publisher ID not found in app-ads.txt”

Cause: The publisher ID in the file doesn’t match your AdMob account, or there’s a formatting error.

Fix: Copy your publisher ID directly from AdMob settings. Check for invisible characters or encoding issues in the file.

HTTPS Redirect Issues

Cause: Your site redirects HTTP to HTTPS (good), but the redirect breaks the crawl.

Fix: Ensure both http://yourdomain.com/app-ads.txt and https://yourdomain.com/app-ads.txt eventually serve the correct file. Most hosting platforms handle this automatically.

Subdomain Mismatch

Cause: Your app store listing shows www.yourdomain.com but your file is hosted at yourdomain.com (or vice versa).

Fix: Be consistent. I recommend using the non-www version and setting up a redirect from www to non-www. In Cloudflare, this is a simple redirect rule.

Caching Issues

Cause: You updated the file, but the old version is still being served due to CDN caching.

Fix: Purge the cache on your CDN (in Cloudflare, go to Caching > Configuration > Purge Everything, or purge just the app-ads.txt URL). Set appropriate cache headers for this file — I recommend a max-age of 3600 (1 hour).

Working with Multiple Ad Networks

If you use ad mediation with multiple networks, your app-ads.txt needs entries for each one. This is common when using AdMob mediation with networks like Facebook Audience Network, Unity Ads, or AppLovin:

# Google AdMob
google.com, pub-3594215621243517, DIRECT, f08c47fec0942fa0

# Example: Additional networks (add only those you actually use)
# facebook.com, FACEBOOK_PUB_ID, DIRECT, c3e20eee3f780d68
# unity.com, UNITY_GAME_ID, DIRECT
# applovin.com, APPLOVIN_SDK_KEY, DIRECT

Each ad network will provide their specific line format. Check their documentation for the exact values.

Important: Only include networks you actually have accounts with and use in your apps. Including unauthorized networks defeats the purpose of app-ads.txt and can raise red flags.

My Setup for Atlantis Kid Apps

For my current apps, my setup is straightforward since I’m using AdMob directly without mediation partners. My complete file is a single line:

google.com, pub-3594215621243517, DIRECT, f08c47fec0942fa0

This file is hosted on my Cloudflare Pages site, which auto-deploys from my Git repository. Whenever I need to update it (for example, adding a new ad network), I simply edit the file, commit, and push. Cloudflare Pages deploys the change within seconds.

The verification status in my AdMob dashboard shows “Verified” for all my apps. Setting this up correctly from the beginning saved me from the revenue impact that many developers experience when they overlook this step.

Key Takeaways

  1. Don’t skip app-ads.txt — it directly affects your ad revenue potential
  2. Format carefully — invisible characters and encoding issues are the most common problems
  3. Match your domains — the domain in app stores must match where the file is hosted
  4. Be patient — verification can take up to three weeks
  5. Keep it updated — when you add or remove ad networks, update the file accordingly
  6. Monitor the status — check your AdMob dashboard periodically for any verification issues

Setting up app-ads.txt is a one-time task that takes minutes but protects your ad revenue for the life of your apps. If you haven’t done it yet, do it today. Your future self (and your revenue) will thank you.