Notification

Get personalized optimization tips, understand your account health and set up completion on the improved "My AdMob page".

Apps

Ensure your app-ads.txt files can be crawled

Once an app-ads.txt file is set up on your developer domain, the Google crawler will:

  • Attempt to crawl the file.
  • Parse the contents of the file to determine seller IDs that are authorized to monetize your inventory.
Note: It may take a few days for app-ads.txt changes to be reflected in AdMob. If your site doesn't make many ad requests it may take up to a month.

To ensure your app-ads.txt file can be crawled, we recommend working through the following troubleshooting steps:

Confirm the file is not temporarily unavailable

If a previously seen app-ads.txt file is unavailable on a subsequent re-crawl, the previously seen entries will be:

  • Purged if the response is a hard 404 error (page that actually doesn’t exist; HTTP 404 status).
  • Retained for up to five days if the response is a soft 404 error (a real page returned for a URL that doesn't actually exist; HTTP 200 status) or a 500 server error.

Confirm that the file is reachable from the root domain

Redirects from domain.com/app-ads.txt to www.domain.com/app-ads.txt are fairly common. App-ads.txt crawling will start at the root domain. The root domain needs to return from, or redirect to, the app-ads.txt file.

An app-ads.txt file on www.domain.com/app-ads.txt will only be crawled if domain.com/app-ads.txt redirects to it.

Ensure crawling is not disallowed by robots.txt

The app-ads.txt file may be ignored by crawlers if a robots.txt file restricts crawling. If your app-ads.txt URL redirects to a different hostname, note that any robots.txt file on that subsequent hostname can also impact crawlers, too.

Update your robots.txt file to allow Google to crawl your app-ads.txt file.

Add the following two lines of text to your robots.txt file:

User-agent: Google-adstxt
Disallow:

Note: In addition to Google-adstxt, the crawler will also obey Mediapartners-Google and Googlebot robots.txt User-agent records.

Ensure file is returned with an HTTP 200 OK status code

While a request for an app-ads.txt file may return the contents of the file in the response body, if the status code in the response header indicates the file was not found (e.g., status code 404):

  • The response will be ignored.
  • The file will be considered non-existent.

Make sure the file has an HTTP 200 OK status code.

Ensure there are no formatting errors or invalid characters in the file

Formatting errors, such as invalid whitespace characters, may be difficult to detect but can make an app-ads.txt file difficult to parse by a crawler, and may therefore result in a file being ignored.

Avoid copying and pasting app-ads.txt entries from a rich text editor; we recommend a plain text editor. You can also check for invalid UTF-8 characters in your app-ads.txt file using a HEX editor.

Make an app-ads.txt file reachable via both HTTP and HTTPS

The Google crawler attempts to crawl all app-ads.txt files on both HTTP and HTTPS. However, a 404 (or 40X) response causes previously crawled entries to be purged, even though an app-ads.txt file is crawled via HTTP. Therefore, if crawling via HTTPS returns a 404 (or 40X):

  • The previously crawled entry will be purged.

Ensure the app-ads.txt is accessible via both HTTP and HTTPS.

Was this helpful?

How can we improve it?
true
Show your support to promote DEI in Gaming by turning intentions into action!

Check out the newly launched Diversity in Gaming website, where you can find video stories and written pledges from global gaming developers. This campaign centers on 3 pillars: diverse teams, diverse games and diverse audiences showing how diversity is not just good for gamers, but for business as well. Show your support by taking the pledge to promote DEI in Gaming and share it on social!

Learn More

Search
Clear search
Close search
Main menu
6041434569339535152
true
Search Help Center
true
true
true
true
true
73175
false
false