# Step 1: Ads.txt Setup

Source: https://docs.ezoic.com/docs/ezoicads/adstxt/


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:


**Important:** Replace `[YOUR_DOMAIN].com` with your actual domain name in all code examples below.


### 1. WordPress Sites (Recommended)

**Easiest option for WordPress users:**

1. Install the [**Ezoic Integration Plugin**](https://wordpress.org/plugins/ezoic-integration/) from your WordPress admin dashboard
2. Activate the plugin and navigate to its settings
3. Enable the ads.txt management feature
4. The plugin handles everything automatically


The Ezoic WordPress plugin automatically manages your ads.txt file and keeps it updated. No technical setup required!


### 2. Server Redirects

**For users with server access:**

**Apache (.htaccess):**

```apache
Redirect 301 /ads.txt https://srv.adstxtmanager.com/19390/[YOUR_DOMAIN].com
```

**Nginx:**

```nginx
server {
    location ~ /ads.txt {
        return 301 https://srv.adstxtmanager.com/19390/[YOUR_DOMAIN].com;
    }
}
```

**PHP:**

```php
<?php
header('Location: https://srv.adstxtmanager.com/19390/[YOUR_DOMAIN].com');
exit;
?>
```

### 3. Automated Updates (Advanced)

**For automatic daily updates:**

```bash
curl -L https://srv.adstxtmanager.com/19390/[YOUR_DOMAIN].com > ads.txt
```


Set up a daily cron job to run this command automatically and keep your ads.txt file current.


## Test Your Setup

1. **Visit** `yourdomain.com/ads.txt` in your browser
2. **Verify** you see a list of authorized ad sellers
3. **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 1. Your website is now properly configured to work with Ezoic's advertising partners, helping maximize your ad revenue.

Ready for the next step? Continue to **Step 2: Site Integration** to add the Ezoic JavaScript code to your website.

