Home / Guides / Advanced ads.txt
Managing ads.txt with multiple ad networks
By the ads-txt.in team · Published November 8, 2026
As your site grows, you may add other ad networks alongside AdSense, or work with an ad management partner. Each one asks you to add lines to your ads.txt file. Keeping the file organised prevents errors and lost revenue.
One file, many networks
A site has only one ads.txt file. Lines from every network go into the same file. Never replace the whole file with a partner’s list unless they confirm it already includes everything you need, such as your own AdSense line.
Organise with comments
Anything after a # is a comment and is ignored by crawlers. Use comments to label each network and record when you added it:
# Google AdSense – added 2026-01-10 google.com, pub-1234567890123456, DIRECT, f08c47fec0942fa0 # Partner X – lines supplied 2026-03-02 examplexchange.com, 5550, RESELLER, 1a2b3c4d5e
When a partnership ends, you will know exactly which lines to remove.
Copy lines exactly
Partners usually supply long lists. Copy them without editing; changing DIRECT to RESELLER or trimming account IDs can break them. Run the combined file through our validator to catch formatting errors and duplicates introduced while pasting.
Remove old lines
Lines for networks you no longer use still authorise those accounts to sell your inventory. Remove them when you stop working with a partner.
Watch for updates
Partners sometimes add or change lines when they connect new demand sources. Many provide a live URL with their current lines. Check it regularly, or ask whether they offer automatic updates through a hosted ads.txt service with a redirect, and make sure any redirect stays within the rules your partner explains.
Keep a backup
Save a copy of your file elsewhere. Website migrations, theme changes and server rebuilds sometimes delete files in the root folder. After any such change, run our checker to make sure the file is still there.