ads.txt File: What It Is and How to Set It Up
A plain guide to the ads.txt file: what each line means, where it must live, how our report scores it and how to fix a missing one.
Free to use 9 min read Updated Oct 2026
ads.txt in one minute
Quick answer: An ads.txt file is a public text file at yourdomain.com/ads.txt that lists the ad companies allowed to sell your ad space, so buyers can tell real inventory from fakes. Our report checks whether that address answers with HTTP 200. Only sites that sell ads need it, and it is not a ranking factor.
- Pass: https://yourdomain/ads.txt answers 200 within 3 seconds.
- Fail: any other answer, a timeout or a connection error. A 401 or 403 answer shows as an amber warning.
- Fix: save your ad partners' lines as a plain text file named ads.txt, upload it to the web root and open the URL.
What is an ads.txt file?
ads.txt stands for Authorized Digital Sellers. It is an open standard from IAB Tech Lab, the technical arm of the Interactive Advertising Bureau, introduced in 2017. The current ads.txt version 1.1 dates from 2022 and added the OWNERDOMAIN and MANAGERDOMAIN variables.
Picture a guest list at the door: you publish it on your own domain, which proves the owner wrote it, and any seller not on it can be turned away. The idea comes from robots.txt.
Ad exchanges, supply side platforms and buyers are the readers. Each one reads the file before trading inventory that claims to sit on your site. Search crawlers ignore it, and apps use a sibling file, app-ads.txt.
Why ads.txt matters if you show ads
Ad fraud such as domain spoofing is the reason the standard exists. Fraudsters sell counterfeit inventory labeled with your domain, and buyers pay for traffic you never received. A public list lets a buyer skip unauthorized sellers in programmatic advertising and header bidding.
The revenue link shows in Google AdSense. Each site gets an AdSense ads.txt status of Not found, Unauthorized or Authorized, and an alert asks you to fix the file so ad revenue is not affected. Google calls the file not mandatory but highly recommended, and Google Ad Manager publishers use the same file.
Search engines do not read it, so it carries no ranking weight. If you run a blog, our SEO tools for bloggers page collects the other free checks worth running.
How SEO Site Checker tests your ads.txt file
The check asks one question about one address.
The rule: our report sends one HTTPS request to /ads.txt on the host you tested and passes the check only when the final response, after redirects, has status 200.
What the report requests
The request is a single GET to https://your-host/ads.txt with the user agent "Mozilla/5.0 (SEO Checker Bot)". It gives the server 3 seconds to connect and 3 seconds to send data, verifies the certificate and follows redirects. The host is the one you typed, so www and non www count as separate sites.
Pass, warning and fail in our report
| What happens | Result | What you see |
|---|---|---|
| Status 200 after redirects | Pass | Green tick and a line saying the site has the file |
| Status 401 or 403 | Warning | Amber icon and the standard message that the site lacks an ads.txt file |
| Any other status, such as 404, 410, 429 or 5xx | Fail | Red icon and the same message |
| Timeout, bad certificate, no HTTPS or too many redirects | Fail | Red icon and the same message |
Warning and fail print identical wording and show the same How to Fix button, and only the icon color differs. A 401 or 403 therefore means the file may exist but our bot was refused. On Cloudflare, check bot fight mode, challenge pages and firewall rules for a block on /ads.txt. A security plugin or leftover basic auth can do the same, and your own browser may get through where our bot does not.
The result also feeds the overall score, so a site with no ads loses a small share for a file it does not need. If you show no ads, publish the placeholder record from the format section: it is the standards-correct way to say no seller is authorized, and it turns the check green.
What the check does not look at
It never reads the content, so it cannot catch bad syntax or mismatched account lines. An empty file passes, and so does a soft 404 page that answers 200. Open the URL yourself, and run the lines through an ads.txt validator from your ad partner.
ads.txt format: how each line is written
Each record is one line with up to four comma separated fields: the ad system domain, your publisher account ID, the relationship and an optional certification authority ID such as a TAG ID. The third field says how you relate to that ad system: DIRECT means you control the account, RESELLER means you let another company sell your space through its own account. The field is not case sensitive, so direct and DIRECT mean the same thing.
# ads.txt example: replace every value with your partner's lines
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
adexchange.example, 12345, RESELLER
CONTACT=ads@example.com
OWNERDOMAIN=example.comLines starting with # are comment lines that ad systems ignore. The zeros stand in for a real ID. Variables such as the CONTACT variable go on their own lines as NAME=value, usually at the end. The specification also defines SUBDOMAIN, MANAGERDOMAIN and INVENTORYPARTNERDOMAIN.
A site that authorizes nobody can publish one placeholder record: placeholder.example.com, placeholder, DIRECT, placeholder. An empty file no longer counts for that purpose. Save as plain text UTF-8. The IAB Tech Lab ads.txt specification holds the full rules.
The companion file is sellers.json, which each ad system publishes itself so buyers can match your lines against its own seller list. Together the two files let buyers check the supply chain behind an OpenRTB bid. It now carries the certification identifiers too, and the specification warns the fourth field may be dropped later, so leave it empty unless a partner gives you the exact ID.
How to create and add an ads.txt file to your website
You do not need an ads.txt generator, because the file is plain text and your ad partners hand you the lines.
Create, upload and confirm
- Copy the lines. Take them from each ad partner dashboard, where AdSense offers the line ready to copy.
- Save a text file. Paste one record per line into a plain text editor and save as ads.txt. Avoid Word files and the name ads.txt.txt.
- Upload to the root. Upload ads.txt to the root directory of the host, usually public_html, so the address is https://yourdomain/ads.txt.
- Open the address. In a private window, confirm plain text appears.
- Wait for the recrawl. Google says a few days, or up to a month for sites with few ad requests. To ask for a sooner recheck, open the site under Sites in AdSense and choose Check for updates.
The Google AdSense ads.txt guide explains each status.
Platform notes
- Self-hosted WordPress. Upload ads.txt to the folder that holds wp-content and wp-admin through your host's file manager or SFTP. With a plugin instead, delete any physical ads.txt first, because the two can clash. On WordPress.com you usually cannot reach the root folder, so look in the site's ad settings first.
- Blogger. Open Settings, then Monetization, switch on custom ads.txt and paste your lines.
- Wix. In the site dashboard open Marketing Integrations, find the Ads.txt section and select Connect, then Add ads.txt, paste your lines and save.
- Shopify. There is no root folder, so this is a workaround, not an official feature. Upload the file under Settings, Files, copy its URL, then create a redirect under Online Store, Navigation, URL Redirects from /ads.txt to that URL. The file sits on a different root domain, so it must not redirect again.
- Squarespace. It documents no root upload either, so upload the file as a file link and add a URL Mapping from /ads.txt to its path, for example with a 301. Menu names change, so recheck them.
- Static hosts. On Netlify or Cloudflare Pages, put the file in the folder your build publishes as the site root.
How to check that your ads.txt file works
Open the ads.txt location in a private window for the www and non www versions.
curl -I https://yourdomain/ads.txt
HTTP/2 200
content-type: text/plain; charset=utf-8Expect status 200 and a text/plain content type, ideally with charset=utf-8. The MDN Content-Type header reference explains the header. The specification says ad systems should treat any other content type as an error and ignore the file, so an HTML error page or a download header will make the file useless even when the lines are correct.
If HTTPS fails, read our SSL and HTTPS test guide. Then run our free report and compare its ads.txt row with the status in your ad partner's dashboard.
Common ads.txt problems and how to fix them
| Symptom | Likely cause | Fix |
|---|---|---|
| ads.txt not found (404) | Wrong folder, wrong name or a rewrite rule | Fix the location or rule, reload the exact URL |
| Unauthorized in AdSense | Line missing or publisher ID mismatch | Copy the line again from the dashboard |
| 401 or 403 (warning) | Firewall, bot protection or password rule | Allow the path /ads.txt |
| Redirect chain | More than one redirect that leaves your domain, or a loop | Point /ads.txt straight at the final file. Redirects within your own domain, such as http to https, are fine |
| Wrong content | HTML error page with 200, Word file, smart quotes | Open the raw URL, keep plain records only |
| Slow or failing host | Reply past 3 seconds or expired certificate | Speed up hosting, renew the certificate |
ads.txt vs robots.txt, app-ads.txt and sellers.json
| File | Written by | Read by | Controls |
|---|---|---|---|
| ads.txt | Publisher | Ad systems, buyers | Who may sell your web ad space |
| robots.txt | Site owner | Search crawlers | Which URLs are crawled, never ad permission |
| app-ads.txt | App developer | Ad systems | The same idea for apps, such as AdMob app-ads.txt |
| sellers.json | Ad system | Buyers | Public list of selling accounts |
Our robots.txt generator builds the crawler file and what a robots.txt file is explains its rules.
How to Fix
The short version, the same steps you see when you click How to Fix in your report.
Why this fails: the report could not load a file at https://yourdomain/ads.txt, so ad partners cannot see who may sell your ad space. A 401 or 403 answer is a warning: the file may exist but a firewall, security plugin or password rule blocks /ads.txt, so allow that path first. Any other error is a fail.
How to fix it:
- Copy the lines. Take the ads.txt records from the dashboard of each ad partner instead of typing IDs by hand.
- Save the file. Paste one record per line into a plain text editor and save it as ads.txt in UTF-8. Avoid a Word document and ads.txt.txt.
- Upload it to the web root. Put it in the folder that holds your homepage so the address is https://yourdomain/ads.txt. If you use a site builder, skip this step and use the platform line below.
- Test the exact host. Our report tests the host you typed, over https, and waits 3 seconds. Open the file with and without www, and fix the certificate or redirect if that address does not load quickly.
# Example. Use the lines your partners give you.
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
# Site with no sellers: use this single record instead
placeholder.example.com, placeholder, DIRECT, placeholder- WordPress: use the file manager, SFTP or an ads.txt plugin.
- Blogger: paste the lines into the custom ads.txt box in the monetization settings.
- Wix: open Marketing Integrations, find the Ads.txt section and select Connect, then Add ads.txt, paste the lines and save.
- Shopify and Squarespace: neither has an official root upload, so upload the file to the platform's file storage, add a redirect from /ads.txt to it, then check the URL shows plain text.
Re-test: open the URL in a private window and confirm plain text appears, then run curl -I on it to see status 200 and text/plain. Run our free report again and check for a green tick. AdSense can take a few days to notice, up to about a month on small sites, as the Google AdSense ads.txt guide explains.
Frequently Asked Questions
Is ads.txt required?
Where do I put the ads.txt file?
Why is my ads.txt file not found?
How do I add an ads.txt file in WordPress?
What is the difference between DIRECT and RESELLER in ads.txt?
What is app-ads.txt and is it the same file?
How long does AdSense take to find a new ads.txt file?
See how your site scores right now
Paste your address into the free report, then use the How to Fix button on anything that needs work.
Free to use. Results in under a minute for most sites.