If AdSense tells you that your site is missing an ads.txt file, the fix is usually straightforward—but only if you use the publisher information from your own account and publish the file in the correct location.
ads.txt stands for Authorized Digital Sellers. It is an IAB Tech Lab initiative that helps publishers declare which companies are authorized to sell their digital advertising inventory. Google strongly recommends ads.txt for AdSense publishers, although Google currently describes it as not mandatory.
What an ads.txt file does
An ads.txt file is a plain-text list of authorized advertising sellers for a domain. It gives buyers a way to check whether a seller has been authorized by the publisher.
It does not make a website eligible for AdSense by itself. A correct ads.txt file cannot compensate for content, policy or site-review problems.
Before you create the file
You need an actual advertising account and the publisher information supplied by that account. Do not copy an ads.txt line from another website, tutorial or screenshot and replace only part of it.
For Google AdSense, Google currently shows the standard line in this form:
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
The pub-0000000000000000 value above is only an example. Your real file must use the publisher ID associated with your own account.
Step 1: Get the ads.txt line from AdSense
Sign in to your AdSense account and follow the current ads.txt instructions shown for your site. Google can provide the exact snippet associated with your publisher account.
This is safer than typing the line manually because the publisher ID is account-specific.
Step 2: Create a plain-text file
Use a plain-text editor such as Notepad on Windows. Save the file with the exact filename:
ads.txt
Do not save it as ads.txt.html, ads.txt.txt or a rich-text document.
Step 3: Add the authorized seller line
Paste the line supplied by Google into the file. If you use additional advertising networks, those networks may provide their own authorized-seller lines. Only add lines that you can verify with the relevant network.
Step 4: Publish it at the site root
For a domain such as example.com, the expected public location is:
https://example.com/ads.txt
The file should be at the root of the domain, not hidden inside a random subfolder.
Step 5: Check the public URL
Open the ads.txt URL in a normal browser. You should see the plain-text contents of the file. If the browser shows a 404, an application error, a login page or unrelated HTML, the file is not being published correctly.
Step 6: Allow time for status updates
Do not assume that an unchanged AdSense status means the file failed. Google notes that it can take a few days for changes to be reflected, and in some cases longer when a site makes few ad requests.
Use the status shown in your AdSense account as the source of truth.
Common ads.txt mistakes
| Problem | What to check |
|---|---|
| File not found | Confirm the exact root URL and filename. |
| Wrong publisher ID | Copy the ID from your own AdSense account. |
| Extra HTML | Use a plain-text file, not an HTML page. |
| Wrong folder | Publish at the domain root. |
| Old status in AdSense | Allow time for crawling and recheck the account. |
| Multiple networks | Only publish authorized lines supplied by those networks. |
What ads.txt does not do
- It does not guarantee AdSense approval.
- It does not guarantee higher earnings.
- It does not replace publisher-policy compliance.
- It does not replace privacy or consent requirements.
- It does not mean every advertising network should be added automatically.
For Tervilo's implementation
Tervilo already has a protected ads.txt capability, but it is intentionally designed not to publish a fake or placeholder publisher ID. Because there is currently no AdSense account, there is no real publisher ID to put into the production file.
When the account exists, the correct sequence is to obtain the publisher-specific snippet from Google, configure it, publish the root-level file and verify the public URL.
Quick answer
Create a plain-text file named ads.txt, add the authorized seller line supplied by your own AdSense account, publish it at https://yourdomain.com/ads.txt, open that URL to verify it is publicly accessible, and then allow Google's systems time to update the status. Never use another publisher's ID or a placeholder as if it were your own.