Many ad networks, including AdSense, are asking publishers to add their credentials to an ads.txt file. This verifies that the ad network is allowed to sell ads on your website. Advanced Ads allows you to manage the content of your ads.txt file and even generates one automatically when AdSense is enabled through the plugin.
You can find the ads.txt options in Advanced Ads > Settings > General > ads.txt.
ads.txt on WordPress
The option to generate an ads.txt file is enabled by default. This would make the file accessible under the following conditions:
- the site is hosted on a top level and not in a subdirectory or subdomain (e.g., example.com works, but not dev.example.com or example.com/dev).
- the AdSense publisher ID is saved in Advanced Ads > Settings > AdSense or additional content is given in the ads.txt content field in Advanced Ads > Settings > General > ads.txt.
- no physical ads.txt file exists. If one is created by another plugin then it would override ours.
When the requirements are met then you should be able to access your ads.txt in the root directory of your site, e.g., example.com/ads.txt.
The file should contain the correct value for your AdSense account as well.
The file generated by Advanced Ads starts with # Advanced Ads ads.txt, which makes it simple to check if it is really generated by our plugin.
ads.txt on multisite
Only one ads.txt file is needed on a multisite. It needs to be hosted on the top level domain and not in a subdirectory or subdomain.
The main blog will contain an option to Generate a single ads.txt file for all sites in the multisite network.
This will generate an ads.txt file with all information from all subpages (needs WordPress 5.1).
My ads.txt doesn’t show up at all
Advanced Ads does only create the link to the ads.txt file when you enable that feature and either enter content in the ads.txt settings in Advanced Ads > Settings > General > ads.txt or when the AdSense publisher ID is added.
My ads.txt contains the wrong entries
Please clear your browser cache and reload the ads.txt link.
If the ads.txt does not show # Advanced Ads ads.txt at the top then the file is not generated by Advanced Ads and either exists already physically in the root directory of your website or another plugin overrides our settings. You must find the source and remove it to use the Advanced Ads ads.txt feature.
What else you might want to know
Developers can include their content to the ads.txt file generated by Advanced Ads using the advanced-ads-ads-txt-content filter.
Advanced Ads does not generate a physical ads.txt file so you won’t be able to see it using FTP.
It is possible that other plugins are overriding our ads.txt. You must then use either their ads.txt feature or ours.
For more information about ads.txt files for AdSense, crawling issues, or the correct format see the AdSense manual.