- Your app must be registered with Google Play Store or the Apple App Store
- The app store listing must include a developer website which is explained below.
To set up an app-ads.txt file for your app:
- Step 1: Establish your developer website
- Step 2: Create your app-ads.txt file
- Step 3: Publish your app-ads.txt file on your developer website
- Step 4: Wait for AdMob to crawl and verify your app-ads.txt file
- Step 5: Check that your app-ads.txt file is verified in your AdMob account
Step 1: Establish your developer website
A developer website lets your users learn more about your apps and other content. It's also how the app-ads.txt standard establishes who owns an app. Your developer website must be linked in your store listings in Google Play or the App Store in order for AdMob and other ad platforms to establish your app's ownership.
If you don't currently have a website set up for your app development business, then you'll need to establish one prior to participating in app-ads.txt. Various free and paid web hosting options are available.
If you don’t have a suitable website that allows the uploading of an app-ads.txt file at the root level, you can use Firebase Hosting to host your app-ads.txt file. Learn more about publishing app-ads.txt with Firebase Hosting.
Once established, update your app's listing in the app stores to include your developer website in the developer contact URL. You may optionally publish any relevant marketing and support information for your app on that website.
Note: You don't need to list your full app-ads.txt URL in the app store listing. AdMob crawls for your app-ads.txt file using the hostname (domain) portion of the website's URL. Learn more about how we find your app-ads.txt file.
Step 1a: Add your developer website in your app store listing
To add your developer website in your app store listing:
- For Google Play: Add the website URL in the contact information of your app store listing:
- Sign in to your Play Console.
- Select an app.
- On the left menu, click Store presence, then Store settings.
- Scroll to Store listing contact details.
- Add your developer website URL. To confirm you successfully added the URL, check that the "Developer Website" link displays at the bottom of your Android app page.
Note: If you added or updated your developer website within your app store listing in Google Play, allow up to 24 hours for AdMob to detect these changes.
- For Apple App Store: Add your developer website in the marketing URL field of your app store listing. To confirm you successfully added the URL, check that the "Developer Website" link displays at the bottom of your iOS app page.
Step 2: Create your app-ads.txt file
If your site doesn't have an app-ads.txt file, you can create one. Your publisher ID must be included and formatted correctly for your ads.txt file to be verified. Create a text (.txt) file using a plain text editor, such as Notepad (Windows) or TextEdit (Mac). You will need to add your personalized code snippet to your app-ads.txt file.
View an example app-ads.txt file:# app-ads.txt example file:
greenadexchange.com, 12345, DIRECT, d75815a79
silverssp.com, 9675, RESELLER, 496211
blueadexchange.com, XF436, DIRECT
orangeexchange.com, 45678, RESELLER
silverssp.com, ABE679, RESELLER
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
In the above example:
google.com
is an ad exchangepub-0000000000000000
is the publisher / account IDDIRECT
is the relationship typef08c47fec0942fa0
is the certification authority ID (e.g., the Trustworthy Accountability Group ID)
Step 2a: Add your personalized code snippet into your app-ads.txt file
AdMob provides a personalized code snippet that makes it easier to set up your app-ads.txt file. The personalized code snippet includes your publisher ID.
To get your personalized code snippet, which includes your publisher ID:
- Sign in to your AdMob account at https://admob.google.com.
- Click Apps in the sidebar.
- Click View all apps.
- Click the app-ads.txt tab.
- Click How to set up app-ads.txt.
- Click
next to the code snippet to copy.
- Paste the code snippet into your app-ads.txt file.
Step 2b: (Optional) Add other authorized seller IDs to your app-ads.txt file
If you're using another ad network, remember to add that network to your app-ads.txt file. This allows your third-party seller to also find and verify your app-ads.txt file. Contact your ad network for their app-ads.txt information.
Step 3: Publish your app-ads.txt file on your developer website
Step 3a: Upload your app-ads.txt file to the root directory of your developer website
The root directory of a site is the directory or folder following the top level domain, e.g., example.com/ads.txt. (For example.com/ads.txt, example.com is the root directory or folder where you would upload your ads.txt file.)
Step 3b: Verify that you published your file correctly
Check if your app-ads.txt file's content is available. In your web browser, enter your app-ads.txt URL (e.g., https://example.com/app-ads.txt). If the app-ads.txt file displays in your web browser, then it's likely that AdMob will successfully find it.
AdMob app-ads.txt crawler
The AdMob app-ads.txt crawler checks for your app-ads.txt file based on the developer website in your app's store listing. In accordance with the app-ads.txt specification, crawlers check for files at the following URL patterns:
https://<<hostname>>/app-ads.txt
http://<<hostname>>/app-ads.txt
The hostname is determined from your app's developer website. This is the website's domain or (in certain circumstances) a subdomain, as described below.
The following table shows general examples of where the AdMob crawler checks for an app-ads.txt file for different developer website URLs.
If the developer website is: | then the Crawler checks in the following order: |
---|---|
https://example.com/game |
https://example.com/app-ads.txt |
http://help.example.com/game |
https://help.example.com/app-ads.txt |
Subdomain rules
The app-ads.txt specification has specific rules regarding subdomains
Crawling up to first-level subdomain
Crawlers probe up to one subdomain level from the developer website when constructing an app-ads.txt URL.
For example:
If the developer website is: | then the Crawler checks in the following order: |
---|---|
http://support.help.example.com/game |
Note: "help.example.com" is at the first subdomain level and used for crawling, while "support.help.example.com" is at the second subdomain level and not used for crawling. |
Exclusion of “www.” and “m.” subdomains
The specification excludes "www." and "m." subdomains as locations where crawlers checks for files.
If the developer website is: | then the Crawler checks in the following order: |
---|---|
https://www.example.com/game |
https://example.com/app-ads.txt |
https://m.example.com/game |
https://example.com/app-ads.txt |
Web server redirects
Your web server may redirect the crawler to an app-ads.txt file hosted elsewhere (including a "www." subdomain).
If the crawler checks for a file here: | Valid redirect destinations could include, but not limited to: |
---|---|
https://example.com/app-ads.txt |
Your website's "www." subdomain: Another subdomain and subdirectory: Another subdomain, subdirectory, or file name: Another domain, including multiple subdomains: |
To investigate whether you published your file correctly, check that you can view your file's content when you access the app-ads.txt URL in your web browser. If you can view the file in your web browser, it's likely that the crawlers will successfully find it.
View the details about AdMob's attempts to crawl your app-ads.txt file in your AdMob account.
Step 4: Wait for AdMob to crawl and verify your app-ads.txt file
It can take up to 24 hours for AdMob to crawl and verify your app-ads.txt files. AdMob routinely checks your latest file, but you can also request AdMob to crawl your app for a faster response:
- Sign in to your AdMob account at https://admob.google.com.
- Click Apps in the sidebar.
- Click View all apps.
- Click the app-ads.txt tab.
-
In the row for the app you want to review, click
to expand. This opens additional details and the option to request AdMob to crawl your app.
- Click Check for updates. When you request AdMob to crawl for an app-ads.txt file, AdMob updates the status for all apps that share the same app-ads.txt file.
- In some cases, the "Check for updates" button may be unavailable. Remember that AdMob routinely crawls your latest file for updates.
Note: It can take up to 24 hours for AdMob to crawl and verify your app-ads.txt files. You need to wait at least 24 hours for the app-ads.txt status to update.
If you've recently added your developer website or updated your app listing in Google Play, allow up to 24 hours for AdMob to detect these changes.
Step 5: Check that your app-ads.txt file is verified in your AdMob account
You can view the status and details of your app-ads.txt file for all your apps in your AdMob account.