Skip to content
Stoqlab

Publishers

Common app-ads.txt errors and how to fix them

By Stoqlab Research · Updated · 7 min read

Most app-ads.txt problems fall into two groups: the file cannot be read where verifiers look for it, or it can be read but some lines do not hold up against the networks' sellers.json. The first group costs every partner at once; the second costs one path at a time. Here are the cases we see most, with the fix for each. The examples use reserved .example domains.

The file is not found

  • Wrong host. Verifiers derive the location from the developer website in the store listing, drop www. and m., and try at most one subdomain before the parent domain. For https://www.studio.example/ the file must answer at https://studio.example/app-ads.txt. Fix: serve it there, or redirect that URL to the file within the same domain.
  • The listing points somewhere else. An old domain, a parent company, a store page or a social profile. Fix: update the listing in every store, and keep the file on the old domain for a few weeks while crawlers catch up (the specification suggests 30 days).
  • A 404 that returns 200. Some sites answer every unknown path with their home page. Crawlers get HTML, not a file. Fix: make the path return the text file, or a real 404 while you have none.
  • Blocked crawlers. A firewall, bot challenge or robots.txt rule that blocks non-browser clients hides the file from every verifier. Fix: allow plain GET requests to /app-ads.txt without JavaScript or cookies.
  • Too many redirects. Redirects inside your root domain are fine; only one redirect to another domain is allowed, and a second one is an error under the ads.txt rules.

The file is not plain text

  • Served as HTML. The ads.txt specification says content types other than text/plain should be treated as an error. Fix: serve Content-Type: text/plain; charset=utf-8.
  • Pasted from a word processor. Smart quotes, non-breaking spaces and invisible characters (a byte-order mark, zero-width spaces) break the first field of a line. Fix: edit in a plain-text editor and check the bytes.

Lines that do not parse

  • A relationship other than DIRECT or RESELLER (DIRCT, RESSELLER), fewer than three fields, a URL instead of a domain (https://ssp.example), spaces inside the domain. Parsers skip such lines entirely.
  • Several records on one line, or one record split across two.
  • Variables written with a colon (OWNERDOMAIN: example.com) instead of =.

The account ID is not in sellers.json

The most common line-level problem by far. The network's sellers.json does not list the account in field #2. Causes: the account was closed or renumbered, a partner's old template was copied in, a prefix is missing or extra (pub- vs ca-pub- for Google), or the line names the wrong network domain. Buyers drop these paths. Fix: ask the network for your current ID, or remove the line if you no longer work with them. Lines nobody uses are not harmless: they authorise an account you do not control.

The relationship contradicts sellers.json

  • DIRECT, but the account is an INTERMEDIARY. Usually a reseller's line labelled DIRECT. Fix: RESELLER, or ask the network to correct its listing if the account is yours.
  • RESELLER, but the account is a PUBLISHER. Usually your own account labelled RESELLER. Fix: DIRECT.

Details in DIRECT vs RESELLER.

Not errors, but worth a look

  • The network has no readable sellers.json. No one can check these lines. Worth asking the network about.
  • Confidential seller. The account exists but its owner is hidden. Fine for your own confidential account; worth questioning for a reseller you do not know.
  • Seller type BOTH. The relationship cannot be confirmed from sellers.json alone.
  • No google.com line on an AdMob app. AdMob verifies apps against app-ads.txt and limits serving for apps it cannot verify. Add google.com, pub-…, DIRECT, f08c47fec0942fa0 with your own publisher ID.
  • Duplicates and hundreds of stale reseller lines. Not invalid, but every authorised account is one more way to sell your inventory. Review the list with each partner once in a while.

Check a file now

The app-ads.txt checker fetches a domain's file the way verifiers do and checks every line against the networks' sellers.json. The statuses it uses are defined on the methodology page. For a given network, its page in the network directory lists the errors publishers make most often with its lines.