This year Admob made it mandatory for apps that integrate Admob ads to create app-ads.txt

What is app-ads.txt?

Authorized App Sellers (or app-ads.txt) is an IAB Tech Lab program that helps ensure that your app advertising resources are sold only through authorized channels that you identify. By creating the app-ads.txt file, you can better control which vendors have the right to sell AD space on your app and prevent the display of fake AD resources to advertisers.

The app-ads.txt file is public and accessible to AD exchanges, supplier platforms (SSP), and other buyside and third party vendors. App-ads.txt extends compatibility on ads.txt to support ads displayed in mobile apps.

To avoid losing a lot of advertising revenue on Admob, we need to create app-ads.txt.

2. Create the app-ads. TXT file

Sample app-ads. TXT file:





Click for a larger version

We must add a well-formed publisher ID to the app-ads.txt file to validate it.

To get a personalized code snippet with a publisher ID:

  1. Visit apps.admob.com and log in to your AdMob account.
  2. The operation sequence is as follows:




Click for a larger version
  1. Click on the aboveStep 4 of the picture, copy button, copy code.
  2. Paste this code snippet into your app-ads.txt file.

3. Create a developer website

We need to build a website before we can join the app-ads.txt program and then we need to add the developer website to the Product details of the GooglePlay App Store for the xyz app





Click for a larger version

If a developer website is added or updated to the product details, it may take some time for AdMob to detect these changes (AdMob scans the app-ads.txt file under the root of your site) :

The store Detection delay time
Google Play Most need24 hours
Apple App Store Most need7 days

Note: AdMob’s app-ads. TXT crawler will look for app-ads. TXT files based on the developer’s website listed in app product details. According to the app-ads. TXT specification, the crawler will look for files in the following url format:

  • https://<< host name >>/app-ads.txt
  • http://<< host name >>/app-ads.txt

The host name depends on the application’s developer site, sometimes the domain name of the site, and in some cases a subdomain name.

The following table shows a few general examples of how AdMob crawls will find app-ads.txt files for different developer sites.





Click for a larger version

(1) Amazon AWS S3

If you have used Ali Cloud, some concepts are quite similar. First, we go to the AWS management console and type in the search box: S3





Click for a larger version

On the S3 Managemenet Console page, you must create an S3 bucket before you can store data in Amazon S3, as shown below: Click Create bucket





Click for a larger version

You can choose the data you want to fill in to create a bucket (remember not to block public access), as long as you make sure others can access the resource, as shown in the picture below:





Click for a larger version

Click the name of the bucket we created to upload files, as shown in the picture below, which is part of the files I uploaded:





Click for a larger version

This time we have their own static site, free oh.

Click app-ads.txt to see the URL





Click for a larger version

Note: At this time, Admob cannot scan the app-ads. TXT file at the bottom of the site.

In this case, we also need to use CloudFront to associate S3 buckets and assign a new domain name. We can use CloudFront to access the contents of buckets so that Admob can successfully capture buckets

(2).CloundFront

CloudFront(Content Delivery Service) is a CDN service from AWS that speeds the distribution of both static and dynamic Web content, such as.html,.css,.js and image files, to users. CloudFront delivers content through a global network of data centers called edge sites. When a user requests you to use content provided by CloudFront, the user is routed to edge sites that provide the lowest latency (time latency) to deliver the content with the best possible performance, seamlessly using any AWS source.





Click for a larger version

Click here to access the CloudFront console

Click Create Assign





Click for a larger version

Select the source domain

The source domain is the S3 bucket we created above





Click for a larger version

Click Create Assign (be sure to check before creating, select all edge sites for price level, otherwise you know)

We can now see the domain name assigned to us:





Click for a larger version

Click to view CloudFront assignments

Below is the CloudFront we just created (the test has been removed, please do not access)





Click for a larger version

Click ID to view the domain name connecting to S3 static website:





Click for a larger version

At this time we can access the file in our corresponding XXX bucket through this domain name

Admob can use the url /app-ads. TXT to access the url. Admob can use the url /app-ads. TXT to access the url

(3). Digression

Click on Route 53 documentation

Route 53, intelligent domain name resolution, which translates domain names into IP addresses in response to DNS queries

Click to see Route 53 features

Route 53 console, this is charging oh, I used to run Route 53 $0.5 per month, just closed Route 53, for me not just need, click to check the charging standard

If you have a personal need, you can read the documentation on how to use it. This is not part of the tutorial for this article

4. Wait for AdMob to grab and verify the app-ads. TXT file

AdMob can take up to 24 hours (or as little as half an hour 😁) to grab and validate the app-ads.txt file. AdMob also checks your latest files regularly, as shown below, for a regular crawl:





Click for a larger version

5. Sit back and wait for earnings to improve

When you request ads for a particular site, Google Adsense checks to see if the site’s root field contains the app-ads.txt file. If app-ads.txt is present and the publisher ID is correct, Google Adsense will bid and return the winning AD, thus improving the quality and revenue of the AD.

How can app-ads. TXT be applied to mobile applications? When the DSP intends to bid for traffic to an app, it scans the app-ads. TXT file on the publisher/developer website and verifies which AD platforms are authorized to sell traffic to the app. The DSP only accepts bidding requests from authorized traffic listed in the file.

What benefits does app-ads.txt bring to your mobile application? App-ads.txt offers two benefits for application developers:

  1. Revenue from brand advertising. Brands now represent a growing and significant revenue opportunity for developers. We expect that most APP-ads.txt compliant DSPS will not purchase traffic without the app-ads.txt file, just as they will not purchase unauthorized traffic on the Web side. Developers who do not apply app-ads.txt may be removed from the target population by the DSP.
  2. Crack down on advertising cheating. Fraudsters misrepresent domain/packet names to mislead the DSP into spending the brand budget on bogus traffic. Legitimate developers end up losing their fair share of advertising revenue. App-ads.txt will block fake, unauthorized developers and limit fraud that damages the rights of legitimate developers.

Jetpack Compose UI creation process + Principle — a full explanation of the concept.Jetpack App Startup how to use and principle analysis 4. Source code analysis | ThreadedRenderer null pointer, the Choreographer to meet 5, by the way. Source code analysis | events is how to the Activity? CountDownLatch source 7.Jetpack Compose – Strings ist kit 8.Jetpack Compose – FloatingActionButton Multi-level suspension menu 9.Jetpack Compose – implement Marquee effect for Text Marquee