Skip to content
SEOComet

ads.txt and app-ads.txt

How SEOComet watches ads.txt and app-ads.txt: a file that goes missing, lines that must be present, syntax errors and a diff of every change.

Updated

ads.txt lists the companies allowed to sell your ad space. If it disappears, or loses a partner’s line, buyers can stop bidding and revenue drops without any error on the site. SEOComet reads the file on every check, compares it with the last one and tells you when something that matters is gone.

ads.txt and app-ads.txt are two separate checks with the same rules. app-ads.txt is the version for apps, kept on the developer’s website. When you add a site, SEOComet adds an ads.txt check whether or not the file is there; if it isn’t, the check shows Not found and sends no alerts until it appears. app-ads.txt only gets a check when the site has one, since only app publishers need it. Add it with Add check if you publish apps. See Missing files.

How often

Every hour on every plan. app-ads.txt runs on the same schedule. See How often checks run.

Lines that must be present

You can list the lines your ad partners gave you in the check’s Settings › Lines that must be present, one per line. If one of them goes missing from the file, that’s critical, since that partner’s demand can stop. The list is empty until you add lines.

Each line is a record: the ad system’s domain, your publisher ID and DIRECT or RESELLER, separated by commas, such as google.com, pub-0000000000000000, DIRECT, with an optional fourth field for the certification ID. The form only accepts lines in that shape.

A line counts as present when the file has a record with the same three fields:

  • The domain and DIRECT or RESELLER match whatever their case.
  • The publisher ID must match exactly.
  • Spaces around the commas don’t matter.
  • The optional fourth field, the certification authority ID, isn’t compared.

Syntax errors

A line that isn’t a valid record is a syntax error. Buyers skip lines they can’t read, so a broken line for a partner works like a missing one. SEOComet raises a warning with the count, and the issue lists up to 50 of them with their line numbers.

A valid record has three or four fields separated by commas: a domain, a publisher ID with no spaces, DIRECT or RESELLER, and optionally a certification ID. These aren’t errors and are skipped:

  • Blank lines.
  • Comments, which start with #.
  • Variables such as contact= and subdomain=.

Versions

SEOComet keeps every version of the file. When records are added or removed, the check raises ads.txt changed as info, with how many lines were added and removed. Changes to spacing, comments, or the case of a domain or relationship don’t count. Open View diff on the issue in the check’s details, Compare versions on the incident, or the check’s Versions tab to compare any two versions line by line.

If the file goes missing for a while, SEOComet remembers the last copy it read, so when the file comes back it’s compared with what was there before the gap.

Versions are kept for as long as your plan’s check history, and the latest one is always kept. See How SEOComet works.

What it can find

Issues the ads.txt and app-ads.txt checks can raise
ads.txt missing Critical The file was there on earlier checks and now isn’t, or a web page answers in its place. A file that never existed raises nothing.
Expected line missing Critical A line you said must be present, usually one from an ad partner, isn’t in the file. That partner’s demand can stop.
Lines that don’t parse Warning Some lines aren’t valid records, and buyers skip lines they can’t read. A record is domain, publisher ID, DIRECT or RESELLER, and an optional certification ID.
Couldn’t check the address Warning The file answered with an error other than 404 or 410, or the request timed out or failed.
ads.txt changed Info Lines were added or removed since the last check. The diff shows which.

Once a missing file is raised, it stays critical on every check until the file is back.