Ads.txt stands for Authorized Digital Sellers and is a method for publishers and distributors to declare who is authorized to sell their ad inventory. You can learn more about it here.
The following steps describe only how to create an ads.txt file for Google ads. You can read more information and refer to Google's full guide here.
1.Create a text (.txt) file.
2. If you have an AdSense, DoubleClick for Publishers (DFP), or Ad Exchange account managed by yourself (not through a third party), include the following line:
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
If you monetize through multiple Ad Exchange and/or AdSense accounts, you must include a separate row for each account, with its corresponding
In order to allow us to use one ad placement on your website, you have to include our publisher information in the ads.txt file by adding the following line:
Your publisher ID is your AdSense, DoubleClick for Publishers (DFP), or Ad Exchange account ID. This ID is in the format of
pub-0000000000000000 with the zeros replaced by your own 16 digit number.
In AdSense: Sign in to your AdSense account, then click Settings > Account > Account information.
In Ad Exchange: Sign in to your Ad Exchange account, then click Admin > Account information.
If you are not sure how to host your ads.txt file at the root level of your domain you can install the Ads.txt Manager plugin. It will help you create, manage, and automatically validate your ads.txt from within WordPress.
The validation baked into the plugin helps avoid malformed records, which can cause issues that can lead to a drop in ad revenue.
After installing and activating the Ads.txt Manager plugin:
Go to Settings (from your WordPress dashboard) > Ads.txt
Add the lines / entries you need
Check it out at www.yoursite.com/ads.txt.