Skip to content
  • There are no suggestions because the search field is empty.

Adding ads.txt for Google Adsense

Learn how to add an ads.txt file to verify your ad network with Google AdSense

ronnel

Written by: Ronnel DG

Last updated: 10 Apr., 2026

An ads.txt file is a plain text file that authorizes ad networks to sell ad space on your website. Google AdSense requires this file to be accessible at the root of your domain. For example, yourdomain.com/ads.txt.

Note: You'll need an ads.txt file from your Google AdSense account before starting. Log in to AdSense, go to Account > Account settings, and find the ads.txt section to copy your file content.

Copying your ads.txt file

  1. Log into your ad network account (Google AdSense, Google Ad Manager, OpenX, Rubicon, AppNexus, etc.).
  2. Find your ads.txt content: 
    - Google AdSense: Account > Account settings > search for "ads.txt"
    - Google Ad Manager: Admin > Monetization settings > ads.txt
    - Other networks: Check your network's support docs for "ads.txt download" or "ads.txt certification."
  3. Copy the entire ads.txt content. It will look something like this:

google.com, pub-xxxxxxxxxxxxxxxx, DIRECT, f08c47fec0942fa0

appnexus.com, 12345, RESELLER

contextweb.com, 558624, RESELLER, 6042ff5d85a7ba4b

Creating a redirect using the B12 AI agent

  1. Open the B12 AI agent chat box. Copy the prompt below, then paste it into the chat. Replace the sample with your own ads.txt content before sending it.
    Here's my ads.txt content. Please create an ads.txt file at the root of my website with this content: [paste your ads.txt]

     

  2. Press Enter/ Return key or click the up arrow image-png-Apr-08-2026-03-59-04-0807-PM to send the prompt to the AI agent.
  3. Wait for the AI agent to confirm that the ads.txt file was created.
  4. Click Publish to save your changes.

Verifying your setup

  1. Open a browser and go to yourdomain.com/ads.txt (replace with your actual domain).
  2. You should see your ads.txt content displayed as plain text.
  3. To confirm the file is valid, run it through an online checker such as ads.txt Validator.

Tip: If Google AdSense still shows a warning after completing setup, wait 24–48 hours. AdSense can take time to detect and process file changes.