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 Options

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 of 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.

AdSense users

Advanced Ads will create the ads.txt file with the correct data for AdSense automatically. Just connect with your AdSense account or add the AdSense publisher ID in Advanced Ads > Settings > AdSense.

You can just close the warning about the missing ads.txt in Advanced Ads now. AdSense will come and check it within a few days.

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).

Troubleshooting ads.txt

Hosting on WP Engine?

Is your site hosted on WP Engine? Please find the solution to the ads.txt not being created in this section.

AdSense and Advanced Ads still show the warning

Advanced Ads imports warnings from AdSense. If you created your ads.txt then just close the warning in the Advanced Ads dashboard. AdSense might need some days to check for the file and will remove the warning automatically when they did.

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.