Adding ads.txt for Google Adsense
Learn how to add an ads.txt file to verify your ad network with Google AdSense
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
- Log into your ad network account (Google AdSense, Google Ad Manager, OpenX, Rubicon, AppNexus, etc.).
- 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." - 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
- 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]
- Press Enter/ Return key or click the up arrow
to send the prompt to the AI agent. - Wait for the AI agent to confirm that the ads.txt file was created.
- Click
Publishto save your changes.
Verifying your setup
- Open a browser and go to yourdomain.com/ads.txt (replace with your actual domain).
- You should see your ads.txt content displayed as plain text.
- 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.