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 your B12 website so you can use Google AdSense.

ronnel

Written by: Ronnel DG

Last updated: 26 Sep., 2025

  This feature requires the Basic Subscription or above.
View plans and pricing here.

Google AdSense requires websites to host an ads.txt file at the root directory of their domain for proper ad verification. Since B12 websites use a Content Delivery Network (CDN) to serve all files and media, you cannot directly upload files to the root directory. Instead, you can achieve the same result by using a redirect.

Google expects the ads.txt file to be accessible at the root of your domain. By creating a redirect, B12 ensures that Google’s crawlers find your file at the correct location, even though the file is hosted in your media library.

Note: An ads.txt file generated by your Google AdSense account is required before proceeding to the next steps.

Upload your ads.txt file

1. In the left sidebar, go to website Website > content Content > Files & Media Files & media.

2. Click Add media > Choose from library > Upload media, then select your ads.txt file.

3. Once uploaded, click the file name to copy its file URL. You’ll need this in the next step.

Creating a redirect

1. In the left sidebar menu, select website Website > settings Settings

2. Under Page redirects, click Manage redirects.

3. Click Add redirect.

4. Set Redirect from to ads.txt. This ensures your file is served at yourdomain.com/ads.txt.

5. For Link type, select External website URL.

6. Under Links to, paste the file URL you copied earlier as the destination.

7. Save the redirect.

Validating your ads.txt setup

Once the redirect is created, visit yourdomain.com/ads.txt.

You should see your ads.txt file content.

To confirm that your setup is valid, use an online validator such as ads.txt validator.

Tip: If Google AdSense still shows errors after setup, give it 24–48 hours to process changes before troubleshooting further.