Introduction
The ads.txt (Authorized Digital Sellers) file is a simple text file hosted on your server that identifies who is authorized to sell your website's ad inventory. By implementing this file, you protect your site from "domain spoofing" and ensure that advertisers only buy through verified channels. This guide provides step-by-step instructions for configuring your ads.txt file using Ezoic’s automated tools or manual redirection.
Implementation Methods
1. Automated Setup
If you are integrated with Ezoic via the WordPress Plugin, this is the most efficient method to manage your authorized sellers.
-
Navigate to the EzoicAds tab and select Ad Transparency.
-
Click on the Ads.txt section > Setup > Select "JavaScript" under Integration.
-
Follow the prompts to allow Ezoic to import your existing entries and authorize Ezoic’s own reseller data.
-
Link to WordPress: In your WordPress admin dashboard, navigate to the Ezoic Plugin settings. Under Ads.txt Manager, enter your Account ID.
Note: Most Ezoic publishers use the default ID 19390. However, if you have registered your own individual account at adstxtmanager.com, you should enter your personal Account ID here instead.
2. Manual Redirection
If you do not use WordPress or choose to update your ads.txt file manually, follow these steps.
Go to EzoicAds > Ad Transparency > Ads.txt Status.
Select JavaScript as your integration method.
Edit Entries: Review the entries imported from your existing file and add any other entries you need, such as your AdSense ID. Add the Ezoic seller lines shown by the dashboard check; these are the Ezoic seller lines your site uses.
Set Up Redirection: Point your site's ads.txt file to the custom URL provided by Ezoic.
WordPress Plugin: Enter your Account ID, either 19390 or your personal ID from adstxtmanager.com, in the plugin settings.
.htaccess Redirect (Apache): Add the following line to your server's .htaccess file: Redirect 301 /ads.txt https://srv.adstxtmanager.com/{AccountID}/yourdomain.com
Nginx Redirect: Add the following rewrite rule to your Nginx configuration file: rewrite ^/ads.txt$ https://srv.adstxtmanager.com/{AccountID}/yourdomain.com permanent;
cURL Command: Use a cron job to fetch the content every 24 hours and overwrite your local file: curl https://srv.adstxtmanager.com/{AccountID}/yourdomain.com > ads.txt
Best Practices & Tips
-
Personal Accounts: If you use a standalone adstxtmanager.com account, ensure you use your unique ID during redirection to maintain control over your custom entries.
-
Avoid Conflicts: Deactivate other
ads.txtplugins to prevent redirect loops or conflicting files. -
Verification: Always click "Verify" in the Ezoic dashboard after setting up your redirect to trigger an Ezoic system check.
- Traffic Routed Through a Subdomain: If any of your traffic is served through a subdomain (e.g., blog.yourdomain.com), that subdomain requires its own valid ads.txt file at blog.yourdomain.com/ads.txt. Ensure the subdomain's file contains the same authorized seller entries as your root domain, or set up the same redirect pointing to your Ezoic ads.txt URL.
Troubleshooting
Existing Ads.txt File Not Up-to-Date:
Google may not allow ad partners to monetize your site when required sellers are missing from this file. Use the Ads.txt validation tool in your dashboard to check for missing or incorrect entries. The check lists the Ezoic seller lines your site actually uses, including the GAM seller line when it is missing.
Changes Not Appearing:
Updates to your ads.txt file are not instantaneous. It typically takes 24 to 48 hours for Google to crawl the file and for the status to update in your dashboard.
WordPress Integration Failures:
If your file is not working on WordPress, verify that you entered your 4- or 5-digit Account ID in the Ezoic WordPress Plugin settings under Settings > Ads.txt Manager.
Validation Issues:
If the file fails to validate, make sure all entries use the standard comma-separated format and that the Ezoic seller lines identified in the dashboard check are present. Validation through Ads.txt Manager can take up to 30 minutes to complete.
Ad Crawlers Being Blocked:
If ad demand is unexpectedly low or your ads.txt file is failing validation, check that your robots.txt file and any firewall or bot-blocking rules, including Cloudflare, are not blocking crawlers used by ad partners to verify your inventory. The following bots must have access to your site:
- Ezoic — full list of Ezoic bots and user agents: https://www.ezoic.com/bot/
- Sincera — Mozilla/5.0 (compatible; SinceraSyntheticUser/1.0; +http://app.sincera.io/bots)
- Google / Ads.txt crawler — Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) — see Google's ads.txt crawling guide and the full list of Google crawlers
- Amazon — https://adbot.amazon.com/
If you use Cloudflare, check your firewall rules and bot fight mode settings to make sure these user agents are not challenged or blocked.
FAQs
Do I need an ads.txt file if I don't use AdSense?
Yes. Most premium ad exchanges require a valid ads.txt file to bid on your inventory. Without it, you will see a significant drop in ad demand and revenue.
Where do I find my personal Account ID?
If you have a standalone account at adstxtmanager.com, your ID is the 4 or 5-digit number found in your account settings or setup instructions.