Skip to content

Instantly share code, notes, and snippets.

@perry-mitchell
Last active August 8, 2019 06:37
Show Gist options
  • Save perry-mitchell/1e9a1ef6bd54b7eb8a7a32878583a04c to your computer and use it in GitHub Desktop.
Save perry-mitchell/1e9a1ef6bd54b7eb8a7a32878583a04c to your computer and use it in GitHub Desktop.
RFC: Ads.txt chaining
# Sample publisher ads.txt
somenetwork.com, 1234, DIRECT
another.org, 4455abc, RESELLER
# !include https://managednetwork.com/managed.ads.txt.php?id=123
# Included ads.txt from initial site
advertiser.com, 9999, RESELLER
network.co.uk, 123400, RESELLER
@dec5e
Copy link

dec5e commented Aug 7, 2019

If you replace $include with #include like this:

#include https://managednetwork.com/managed.ads.txt.php?id=123

it would help to gradually start using this feature without breaking old ads.txt scrapers - they would ignore this line as a comment.

@perry-mitchell
Copy link
Author

@dec5e Good point! Graceful fallback. It'd still fail of course as the new lines wouldn't be read on older fetchers, but at least parsing wouldn't fail. The only problem with that approach is that regular comments could include the "include" word as part of a regular comment, and then fail. Eg:

# My ads.txt
#
# This ads.txt was generated by some bot, and it should
# include the correct amount of lines

So for cases like that it'd be tricky. Maybe best to still have it prefixed inside the comment?

# My ads.txt
somenetwork.com, 1234, RESELLER

# !include https://site.com/ads.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment