How to Add Authorized Ad Networks to Your Ads.txt File
Learn step-by-step how to get and add authorized ad networks to your ads.txt file. This simple guide shows you how to list ad networks like Google AdSense that are approved to serve ads on your website, helping to keep your ad space secure and maximize revenue.
To get and add Authorized Networks to your ads.txt file, you need to follow a process where you list the ad networks that are authorized to sell or serve ads on your website. Here’s how you can do that:
1. Get Your Ad Network IDs
Each ad network (such as Google AdSense, Rubicon, OpenX, etc.) has a unique identifier, and you need to collect those to list them in your ads.txt file. For Google AdSense, you will need your own AdSense publisher ID. If you have contributors, you may need their respective AdSense publisher IDs as well.
For Google AdSense:
- Your AdSense publisher ID can be found in your Google AdSense account:
- Log in to your AdSense account.
- Click on the gear icon (Settings) and select Account Information.
- Under Account Settings, you will see your Publisher ID starting with "ca-pub-".
For Other Networks:
- You can obtain publisher IDs or network information by signing up for each ad network and accessing their respective dashboards.
- If you’re using multiple ad networks (like OpenX, Rubicon, etc.), you can find these IDs in the network’s account settings or dashboard.
2. Format Your ads.txt File
Once you have the ad network IDs, you need to create or update your ads.txt file with a list of authorized ad networks. The format follows this structure:
, ,
: The domain of the ad network (e.g.,google.com
,openx.com
,rubiconproject.com
).
: Your unique publisher ID for each ad network.
: This indicates whether you are dealing directly with the network (DIRECT
) or if the network is reselling your inventory (RESELLER
).
Example:
If you are using Google AdSense and have an additional network like Rubicon, your ads.txt file might look like this:
google.com, ca-pub-1234567890123456, DIRECT
rubiconproject.com, 12345, RESELLER
openx.com, 67890, RESELLER
This indicates that:
- Google AdSense is authorized to serve ads on your site, and you have a direct relationship.
- Rubicon Project and OpenX are authorized as resellers, meaning they can sell ads on your site on your behalf.
3. Add the ads.txt File to Your Website
Once you have the ads.txt file ready, you need to upload it to the root directory of your website. Here’s how to do it:
For WordPress:
- Use a plugin like File Manager or Yoast SEO (which allows for adding custom files) to upload your ads.txt file.
- Or, manually upload it via FTP:
- Use an FTP client (like FileZilla) and log in to your web hosting.
- Go to the root directory of your website (where
index.html
orwp-config.php
is located). - Upload the ads.txt file here.
For Non-WordPress Sites:
- Access your hosting control panel (like cPanel or Plesk) or use FTP to upload the ads.txt file directly to the root directory of your website.
- Ensure the ads.txt file is publicly accessible by visiting
http://yoursite.com/ads.txt
.
4. Verify ads.txt is Working
Once you’ve added the ads.txt file, you can verify that it’s accessible:
- Go to
http://yourdomain.com/ads.txt
in a browser. - You should see the content of your ads.txt file displayed.
5. Keep the ads.txt Updated
- Whenever you add new networks, contributors, or update your AdSense ID, make sure to keep your ads.txt file updated.
- If a new ad network is authorized to sell ads on your site, you will need to add their domain and publisher ID to the list.
6. Why Use ads.txt?
- It prevents unauthorized ad sales on your site by only allowing verified networks.
- Helps increase trust and transparency in the advertising ecosystem, ensuring that advertisers know they are working with legitimate publishers.
Summary Steps:
- Obtain the publisher IDs for each ad network you want to list (AdSense, Rubicon, OpenX, etc.).
- Format them properly in the ads.txt file.
- Upload the ads.txt file to your website’s root directory.
- Verify it’s publicly accessible by visiting the file's URL.
By doing this, you’re ensuring that only the authorized networks can serve ads on your website and protecting against unauthorized ad sales.
What's Your Reaction?