> For the complete documentation index, see [llms.txt](https://wiki.playgama.com/playgama-ad/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.playgama.com/playgama-ad/getting-started/ads-txt.md).

# ads.txt

## What is ads.txt?

Ads.txt (Authorized Digital Sellers) is an IAB initiative that lets publishers publicly declare which companies are authorized to sell their ad inventory. It is a plain text file hosted at the root of your domain that ad buyers and verification systems read to confirm your inventory is being sold through legitimate channels.

Ads.txt prevents unauthorized or spoofed ad sales — a common form of ad fraud where fraudsters sell fake impressions claiming to be your inventory. Most premium demand partners, including Google Ad Exchange, will not bid on inventory from domains without a valid ads.txt file.

**Your ads.txt must be live before we can submit your domain to Google Ad Exchange and other partners for approval.**

***

## How ads.txt Entries Work

Each line in ads.txt declares one authorized seller relationship. The format is:

```
<ad system domain>, <publisher ID>, <relationship>, <certification authority ID>
```

* **`DIRECT`** — you have a direct commercial relationship with this ad system (e.g. your own Google Publisher ID)
* **`RESELLER`** — this company is authorized to resell your inventory through another party (e.g. Playgama and its SSP partners acting on your behalf)

***

## Implementation

### Full Template

{% hint style="info" %}
The required `ads.txt` entries are actively being updated. Contact your account manager to receive the complete and current list of lines for your domain.
{% endhint %}

### Step 1. Specify Your Owner Domain

Set your primary site domain in the `OWNERDOMAIN` variable:

```
OWNERDOMAIN=partner-site.com
```

### Step 2. Add Your Google DIRECT Line

Every publisher requires a direct line with Google Ad Manager. Replace `pub-xxxxxxxxxxxxxxxx` with your Google Publisher ID:

```
google.com, pub-xxxxxxxxxxxxxxxx, DIRECT, f08c47fec0942fa0
```

You can find your publisher ID in your Google Ad Manager account under **Admin → Global Settings**.

### Step 3. Add Your Playgama partner ID

Replace `p_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` with your assigned `playgama_clid`:

```
playgama.com, p_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, DIRECT
```

### Step 4. Upload to Your Domain Root

Place the complete file so it is publicly accessible at:

```
yourdomain.com/ads.txt
```

The file must be at the **root of your domain**, not in a subdirectory. For example:

* ✅ `example.com/ads.txt`
* ❌ `example.com/static/ads.txt`

***

### Step 5. Verification

Once your ads.txt is live, contact your account manager. The team will confirm the file is responding correctly and all required entries are present. We submit your domain to Google for review and proceed with the SSP partner approvals.

You can also self-verify by opening `yourdomain.com/ads.txt` in a browser — the plain text file should be visible.

***

## Common Issues

| Issue                                   | Solution                                                                                 |
| --------------------------------------- | ---------------------------------------------------------------------------------------- |
| File not accessible at `/ads.txt`       | Ensure the file is at the domain root, not a subdirectory                                |
| File returns HTML instead of plain text | Check your server is not routing `/ads.txt` to your app's 404 page                       |
| Missing entries                         | Contact your account manager to receive the complete and current list of required lines  |
| 301 redirect instead of file            | Some platforms (e.g. Cloudflare, CDN) may interfere — verify the file is served directly |
