12AppTesting logo12AppTestingClosed Testing Service
HomeAboutHow It WorksPricingBlogFAQContact
Home › Blog › App-ads.txt for Google Play and AdMob: Setup Guide

App-ads.txt for Google Play and AdMob: Setup Guide

Quick answer To set up app-ads.txt for AdMob, add your developer website to your Google Play store listing, create a plain text file named app-ads.txt with the line AdMob gives you, upload it to the root of that website, then check its status in AdMob. Verification can take up to 24 hours.
Illustration for the guide: App-ads.txt for Google Play and AdMob: Setup Guide

You added AdMob to your app, but AdMob keeps asking about app-ads.txt. The file is small, yet it fails for simple reasons: the developer website is missing from the store listing, the file is in the wrong folder, or the line is mistyped. This guide shows the setup in the right order, explains how AdMob crawls your site and lists every error Google names with its fix.

What is app-ads.txt and how do you set it up?

app-ads.txt is a plain text file that lists who is allowed to sell ads in your app. To set it up for AdMob, put your developer website in your Google Play store listing, create a text file named app-ads.txt that contains the line AdMob provides, upload it to the root folder of that website, and check its status in AdMob. Google says it can take up to 24 hours for AdMob to crawl and verify the file.

Google explains the process on its app-ads.txt setup page, and its troubleshooting steps are on the app-ads.txt status page. It describes the file as the way the standard establishes who owns an app, and says a listing for an app you do not own is a sign it is working to protect you against ad fraud.

What do you need first?

RequirementWhat Google saysHow to do it
App registered in a storeYour app must be registered with Google Play or the Apple App StorePublish at least to a testing track and link the app in AdMob. AdMob ads not showing in a new app
Developer website in the listingThe store listing must include a developer website. In Google Play add it under Store listing contact details.Add your website URL there and save
A website you controlYou must have a developer website to use app-ads.txt. If your site cannot host a root-level file, Google suggests Firebase Hosting.Use your own domain's hosting, or a free static host

If you do not have a website yet, create a small static one with a home page, a privacy policy and the file. A privacy policy is needed anyway. See the Data safety and privacy policy guide.

How do you create the file?

  1. Open AdMobGo to Apps > View all apps > app-ads.txt and open How to set up app-ads.txt.
  2. Copy the snippetAdMob gives you your line with your publisher ID. Copy it exactly.
  3. Create a text fileOpen a plain text editor, paste the line, and save the file as app-ads.txt. Use plain text, not a word processor.
  4. Add other networks (optional)If you use other ad networks, add their seller lines too, each on its own line.

Google says the file must follow the IAB Tech Lab format and your publisher ID must be included and formatted correctly. Each line has the pattern domain, account ID, relationship type, as in this example with a placeholder ID:

google.com, pub-0000000000000000, DIRECT

Your AdMob snippet may include extra fields at the end, which is why you should copy it from AdMob instead of typing it. A typo in the ID or the wrong domain, such as admob.com instead of google.com, is a listed cause of failure.

Where do you host it?

Upload the file to the root directory of your developer website, so that it opens at https://yourdomain.com/app-ads.txt. On shared hosting, that is the same folder as your home page, often called public_html. Then open the URL in a browser. Google says if the content displays, AdMob will likely find it.

Hosting setupWhere the file goesCheck
Shared hosting or cPanelIn public_html, next to index.htmlOpen yourdomain.com/app-ads.txt
Static site generatorIn the folder that is copied to the site rootCheck after deploying
Firebase HostingIn the public folder you deployCheck after deploying
WordPressIn the site root folder, with a file manager or FTPCheck the URL, not the dashboard

One domain can serve many apps. Keep one file with all your lines and use the same developer website for every app you publish. See publishing a Thunkable app or publishing a Flutter app if you are still building.

How does AdMob find the file?

The crawler takes the developer website from your store listing and checks https://hostname/app-ads.txt and then http://hostname/app-ads.txt. Google gives these rules:

SituationWhat the crawler checks
Listing URL is https://www.example.com/gameexample.com, because www. and m. subdomains are excluded
Listing URL is http://support.help.example.com/gamehelp.example.com first, then example.com
Your server redirects to another locationRedirects can be valid, including to a www. subdomain
You changed your website or listing recentlyAllow up to 24 hours for detection

If the file cannot be published at the current location, update your store listing to point to a different subdomain or domain. A file on an unsupported subdomain must be reachable at the app-ads.txt URL shown in your AdMob account.

How do you check the status?

  1. Go to Apps > View all apps > app-ads.txtFind your app in the list.
  2. Expand the rowRead the status and the crawled URL.
  3. Click Check for updatesThis requests a crawl. Google says the button is sometimes unavailable, and AdMob crawls routinely anyway.
  4. Wait up to 24 hoursCheck again after the app has made ad requests.

Google notes that the status will not show if your app has not generated an ad request in the last 7 days. A new app that is not serving yet may therefore show nothing for a while. If your ads themselves are missing, read ads not showing in a new app and limited ad serving.

What are the common errors?

ProblemWhat Google saysFix
File not foundThe file must be on your developer website domain, the app registered, and the website in the listingCheck all three, then check the URL in a browser
Website missing from the listingLook at the Developer Website link in the Google Play app support sectionAdd it under Store listing contact details
Invalid website URLCheck it against the crawler and subdomain rulesUse a root domain or a supported subdomain
Formatting errorsA missing or incorrect publisher ID, typos or the wrong domainReplace the whole file with the snippet from AdMob
robots.txt blocks the crawlerAdd User-agent: Google-adstxt followed by Disallow:Edit robots.txt. The crawler also obeys Mediapartners-Google and Googlebot rules.
Crawler hits the wrong URLThe detailed status shows the exact crawled URLSet a redirect from that URL to the correct one

A robots.txt example that allows the crawler:

User-agent: Google-adstxt
Disallow:

What mistakes happen with new apps?

MistakeFix
Waiting until after launchPrepare the website and the file during your closed test. More about the closed test
Using a free blog URL you do not controlUse a domain where you can upload a root file
Different developer websites for different appsUse one site and one file for all your apps
Typing the line by handCopy it from AdMob
Saving as app-ads.txt.txtShow file extensions and rename the file
Clicking your own ads to testNever do this. Invalid traffic and appeals

Finally, remember the declarations. Your Data safety form for an AdMob app must match the ads you show, and your target audience answers affect which ad settings are allowed.

Part of a series: this article is one chapter of Google Play Closed Testing: The Complete Guide. Start there for the full roadmap from setup to production.

Sources

Frequently asked questions

What is app-ads.txt?

Google describes it as the standard file that establishes who owns an app and which sellers are authorized to sell its ads. It is a plain text file hosted on your developer website.

Where must I put the file?

In the root directory of your developer website, for example example.com/app-ads.txt. Open the URL in a browser: if the content displays, AdMob will likely find it.

How does AdMob find my website?

From the developer website in your store listing. In Google Play, add it under Store listing contact details. Google says you must have a developer website to use app-ads.txt.

How long does verification take?

Google says it can take up to 24 hours for AdMob to crawl and verify your file, and store listing changes can also take up to 24 hours to be detected.

Why does AdMob not show a status?

Google says the status will not show on the app-ads.txt page if your app has not generated an ad request in the last 7 days.

Can I use a www or m subdomain?

Crawlers exclude www. and m. subdomains. For https://www.example.com/game they check example.com. For other subdomains they check up to the first-level subdomain.