WordPress Help

Add the ads.txt file to my WordPress site

If you have a WordPress site that displays ads, you can prevent fraudulent practices by using the ads.txt file. It's a text file that allows you to publicly declare which companies are authorized to sell or resell advertisement space on your site. Follow these instructions to install the Ads.txt Manager plugin from your WordPress dashboard.

  1. Sign in to WordPress.
  2. On the left-side menu, select Plugins and then Add New.
  3. In the Search plugins bar, enter Ads.txt Manager.
  4. Find the Ads.txt Manager plugin (by 10up), select Install Now and then select Activate.
  5. On the left-side menu, select Settings and then select Ads.txt.
  6. Under Manage Ads.txt, you can create your ads.txt file by adding authorized sellers and resellers. Each of them should be on a separate line and should include the following information:
    • Domain name of the authorized seller
    • Publisher ID
    • Type of relationship (DIRECT or RESELLER)
    • (Optional) Certification Authority ID

    Example: google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

  7. Select Save.
  8. Verify your ads.txt file in a browser by adding /ads.txt at the end of your URL (for example, https://example.com/ads.txt). If the content is not visible or the page returns a 404 error, ensure that you have saved the file correctly in the Ads.txt Manager.

Once you have successfully added the ads.txt file to your WordPress site, it's important to inform your advertising partners, such as Google AdSense, about the update. This will ensure that they recognize your site as an authorized seller and prevent any disruption to your ad revenue.

More info

  • If you don't want to use a plugin, you can create an ads.txt file on your local computer and upload it to your site using File Manager. It should be uploaded to the directory with your WordPress installation.
  • Here's a guide for adding Google AdSense to the ads.txt file.
  • If you see errors in your Google AdSense account, check out their official documentation to troubleshoot the issue.

Share this article