Welcome to WebmasterWorld Guest from 54.227.48.147

Forum Moderators: incrediBILL & martinibuster

Ads.txt

     
11:11 am on Jan 23, 2018 (gmt 0)

New User

joined:Oct 16, 2017
posts: 8
votes: 1


I had to add an Ads.txt file for PubGalaxy. Once I did, I got an alerts from Adsense

Sites with ads.txt issues
error_outline
Publisher ID missing from ads.txt files
You need to add your publisher ID to the following ads.txt files:
the-boneyard.com/ads.txt
This will prevent a potentially severe impact on your earnings. Copy and paste the following code snippet into each ads.txt file:
google.com, pub-xyz, DIRECT, xyz

Is this all I need to add for Adsense? The PubGalaxy instructions contained a long list of urls.
12:12 pm on Jan 23, 2018 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:Aug 14, 2014
posts:182
votes: 42


That is all you need for your personal Adsense account.

Your other ad companies should provide you with their own ads.txt lines (so add them to the txt file as needed). Additionally, if any of them use Adsense themselves, you'll have to input those into your ads.txt as well (and label it as RESELLER).

So for one of my sites (using Adsense and Medianet), it looks like this...

#Ads.txt sitename-dot-com

google.com, pub-xyz, DIRECT, xyz (my personal Adsense acct)
media.net, xyz, DIRECT (medianet's basic acct info)
google.com, pub-xyz, RESELLER, xyz (medianet's Adsense acct)
9:54 pm on Feb 9, 2018 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:May 29, 2007
posts:802
votes: 94


This is the first line of my ads.txt file.

#Ads.txt example.com

This is the message I get when I try to validate it:

Line 1: The ads.txt validator could not parse this line.
Please make sure it follows the format specified by the IAB

Does anyone know what could be wrong?
11:47 pm on Feb 9, 2018 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:10624
votes: 630


@Tom1961 - more info here:
Ads.txt [webmasterworld.com]

@azlinda - remove that line
1:07 am on Feb 10, 2018 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:May 29, 2007
posts:802
votes: 94


Thank you, keyplyr!
3:05 am on Feb 10, 2018 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:10624
votes: 630


@azlinda - the commented line(s) should not cause an error. Some ads.txt validator tools error the comment, others do not.

Just a FYI- any tool is created by someone to check against one or more metrics. This may be biased toward specifics of design, application or purpose and not correctly reflect your intended use.

Always use more than one tool to check any file for errors.
3:09 am on Feb 10, 2018 (gmt 0)

Junior Member

joined:Jan 21, 2018
posts:44
votes: 2


I have a stupid question on ads.txt...is the # actually part of the syntax?
3:18 am on Feb 10, 2018 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:10624
votes: 630


@Unshiny - no.

When a "#" starts a line, it blocks that line from being parsed.

The "#" is called a "comment" because many programmers leave comments in their code to help other understand the code.

The entire commented line can be removed, or left there.
7:04 am on Feb 10, 2018 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:10624
votes: 630


I've found this validator accurate: [adstxt.adnxs.com...]
7:28 pm on Feb 10, 2018 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:May 29, 2007
posts:802
votes: 94


@Keyplyr - that's the validator I use. I have a friend who has the same #comment line at the top of her ads.txt file, and it passes with flying colors. Mine didn't.
7:47 pm on Feb 10, 2018 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:10624
votes: 630


Well there's really no reason to include *any* commented lines in ads.txt, unless you are using several ads.txt files for different sites and you want to remember which applies to which site.

For a site that uses one Adsense account, all you need is:

google.com, pub-************, direct
3:57 pm on Feb 11, 2018 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:May 29, 2007
posts:802
votes: 94


You would think that the validators would ignore the comment lines.
8:29 pm on Feb 11, 2018 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:10624
votes: 630


They usually do, but as I said a couple posts above, tools can be buggy.

There also may have been something odd about that comment line of yours; possibly some proceeding spacing.
10:58 pm on Feb 11, 2018 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:May 29, 2007
posts:802
votes: 94


There also may have been something odd about that comment line of yours; possibly some proceeding spacing.


Nope, it's rock solid! It's most likely a buggy tool as you said.
8:00 am on Feb 16, 2018 (gmt 0)

Senior Member from IN 

WebmasterWorld Senior Member Top Contributors Of The Month

joined:Apr 30, 2017
posts:699
votes: 86


PubGalaxy has also asked me to add Ads.txt. According to them, I should be using it even if I have only AdSense and Adx, why?

@Tom Please share your experience with PubGalaxy.