Forum Moderators: martinibuster

Message Too Old, No Replies

Ads.txt

         

Tom1961

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

5+ Year Member



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.

CommandDork

12:12 pm on Jan 23, 2018 (gmt 0)

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



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)

azlinda

9:54 pm on Feb 9, 2018 (gmt 0)

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



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?

keyplyr

11:47 pm on Feb 9, 2018 (gmt 0)

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



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

@azlinda - remove that line

azlinda

1:07 am on Feb 10, 2018 (gmt 0)

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



Thank you, keyplyr!

keyplyr

3:05 am on Feb 10, 2018 (gmt 0)

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



@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.

Unshiny

3:09 am on Feb 10, 2018 (gmt 0)

5+ Year Member Top Contributors Of The Month



I have a stupid question on ads.txt...is the # actually part of the syntax?

keyplyr

3:18 am on Feb 10, 2018 (gmt 0)

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



@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.

keyplyr

7:04 am on Feb 10, 2018 (gmt 0)

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



I've found this validator accurate: [adstxt.adnxs.com...]

azlinda

7:28 pm on Feb 10, 2018 (gmt 0)

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



@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.

keyplyr

7:47 pm on Feb 10, 2018 (gmt 0)

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



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

azlinda

3:57 pm on Feb 11, 2018 (gmt 0)

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



You would think that the validators would ignore the comment lines.

keyplyr

8:29 pm on Feb 11, 2018 (gmt 0)

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



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.

azlinda

10:58 pm on Feb 11, 2018 (gmt 0)

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



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.

MayankParmar

8:00 am on Feb 16, 2018 (gmt 0)

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



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.