Step 2: Ads.txt Setup
Ads.txt setup is required for all publishers using Ezoic. This file helps maximize your ad revenue by ensuring authorized ad partners can bid on your inventory.
What is Ads.txt? 🔗
Ads.txt is a simple text file that tells advertisers which companies are authorized to sell ads on your website. Think of it as a "verified seller" list that prevents unauthorized companies from selling fake ad space on your domain.
Choose Your Setup Method 🔗
Select the method that best fits your website setup:
[YOUR_DOMAIN].com
with your actual domain name in all code examples below.
1. WordPress Sites (Recommended) 🔗
Easiest option for WordPress users:
- Install the Ezoic Integration Plugin from your WordPress admin dashboard
- Activate the plugin and navigate to its settings
- Enable the ads.txt management feature
- The plugin handles everything automatically
2. Server Redirects 🔗
For users with server access:
Apache (.htaccess):
1Redirect 301 /ads.txt https://srv.adstxtmanager.com/19390/[YOUR_DOMAIN].com
Nginx:
1server {
2 location ~ /ads.txt {
3 return 301 https://srv.adstxtmanager.com/19390/[YOUR_DOMAIN].com;
4 }
5}
PHP:
1<?php
2header('Location: https://srv.adstxtmanager.com/19390/[YOUR_DOMAIN].com');
3exit;
4?>
3. Automated Updates (Advanced) 🔗
For automatic daily updates:
1curl -L https://srv.adstxtmanager.com/19390/[YOUR_DOMAIN].com > ads.txt
Test Your Setup 🔗
- Visit
yourdomain.com/ads.txt
in your browser - Verify you see a list of authorized ad sellers
- Clear your website cache if the file doesn't appear immediately
Complete! 🔗
Once your ads.txt file is working correctly, you've successfully completed Step 2. Your website is now properly configured to work with Ezoic's advertising partners, helping maximize your ad revenue.
Ready for the final step? Continue to Step 3: Ad Placements to start displaying ads on your website.