Online Marketing Strategies

How To Fix ads.txt File Errors in Google Adsense.

2022-01-29 | 1308 Print Friendly Version of this pagePrint Get a PDF version of this webpagePDF


How To Fix Ads.txt File Errors In Google Adsense Account (Solved)

If you run a Google Adsense Account on your website, whether a WordPress blog, blogger, Wix, a standard website, or other cms platforms there is a higher chance you might have come across this error on your Google Adsense account dashboard. In this post, I will explain how to fix this issue that might be caused by a few factors most people neglect to consider.

seo web analyst blogger community

But First, What is ads.txt?

It is an acronym for  Authorized Digital Seller txt file which was presented by the Interactive Advertising Bureau (IAB) to combat online advertising fraud, although this method of battling bot traffic that ends up viewing and clicking on ads instead of real humans is simple, secure, and the implementation for publishers is not all that hard; yet a lot of people seems to fall short of how to implement them correctly (We shall discuss the solutions to fixing your Google Adsense ads.txt file errors soon).

The Ads.TXT file is structured to be referenced by programmatic advertisers/buyers when purchasing advertising inventory from sellers, this solution offer publishers full control over their inventory since they should be the only entities with access to their domain and hosting root to upload the ads.txt file a quick reference to my latter post on Can I Have Two Google AdSense Account on My Website?... Yes, You Can (opens a new tab).

The Interactive Advertising Bureau is aware of the fact that publisher not only market their ad inventory through one particular channel and the ads.txt file is designed to support that.

The following publisher inventory selling is supported via:

  • Ad exchanges through personal accounts
  • Ad networks that sell as programmatic partners
  • Content syndication partnerships

Fun Fact: The ads.txt file should allow advertisers to check if a specific publisher allowed a media agency to sell ad space, also called digital inventory, on their site. Practically, they would just open the ads.txt file and check if the media agency is listed there.

Example of an ads.txt for AdSense

Let’s take a look at an example of the ads.txt AdSense code for a normal AdSense account:

google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

 

You can copy the example from above and only need to replace pub-0000000000000000 with your own publisher ID to get the valid record for your ads.txt. and save as a txt file then upload it on your root domain server ie home /public_html/your_domainname.

Type of Ads.txt Account

The third entry in the ads.txt record contains the relationship between the ad partner and you. There are only two options: DIRECT and RESELLER.

  • DIRECT means that you, the publisher, are the account owner.
  • RESELLER means that the account owner is a third party that was authorized by you to monetize your site.

Each line of text within the ads.txt spec file contains between 3-4 fields of information which the first three fields are required. Here’s an example:

, , ,

As mentioned, Field 1 – Field 3 is mandatory whereas Field 4 is optional.

The following excerpt from the IAB official document explains each field and its purpose in detail.

seo web analyst blogger community

Image illustration from Monetizemore

As a publisher, your Ads.TXT file will be arranged as follows:

#< SSP/Exchange Domain >, < SellerAccountID >, < PaymentsType >, < TAGID >

Different situations require different ads.txt setups as not all publishers sell inventory the same way. Three example cases exist as shown below:

Single System Direct

In this instance, you as a publisher only sell your inventory via a single system that you control. Here’s an ads.txt example according to the Interactive Advertising Bureau:

google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

Single System Reseller

Here, very similar to “Single System Direct,” you as a publisher only sell your inventory via a single system, but instead of controlling it, an independent company manages the reselling of your inventory. In the example below the fourth field got excluded as the reseller was not verified independently. Here’s an ads.txt example according to IAB:

seowebanalyst.com, pub-0000000000000000, RESELLER

Fun Fact: Your Google Adsense ads.txt file cannot contain a reseller account id, but a direct, even if you are running your Google Adsense account on another website that permits you to input your Google Adsense publisher codes.

Multiple resellers and systems

This example is a combination of the previous two where more than one “single system direct” and “single system reseller” are used. Some advertising systems are verified and thus can add “field #4” at the end of the line of text with their Certification Authority ids. Here’s an example according to IAB:


# My Google Adsense
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
aol.com, 47594, RESELLER, e1a5b5b6e3255540 #33Across #hb #tag #viewable
indexexchange.com, 183635, RESELLER, 50b1c356f2c5c8fc #33Across #hb #tag #viewable

Fun Fact: All Google's Adsense accounts holders have the same TAG ID "f08c47fec0942fa0" you can also comment out statement for easy access of your ad serving platforms or urls.

 

How To Fix Ads.TXT File Error on Google Adsense Account

First, you need to download your ads.txt file from Google Adsense and then upload it to the root domain of your website, just as highlighted in the Google Adsense home page image above. This will solve the most common problem of earning at-risk warnings!. Earning at risk- You need to fix some ads.txt file issues to avoid a severe impact on your revenue or simply you can see this error in your Adsense notification and then tap on the fix now, this will only work if you already have a live ads.txt file that was serving prior an issue.

Other Solutions To Fix Ads.TXT File Error

There are two more steps to look at if uploading your file to the root domain doesn't solve the issue, you can actually check your redirects.

It is not just by accessing your ads.txt file via your domain name that marks it indexable eg domainname.com/ads.txt but also to be able to use different

variances of your domain name and to be able to access them redirecting to a single domain. When I talk about domain variances, I meant all possible URL access to your domain name as follows;

http://yourdomainname.com

http://www.yourdomainname.com

https://yourdomainname.com

https://www.yourdomianname.com

They should all redirect to your preferred version of HTTPS (https://www) with or without www are now seen as one URL with the primary being with.

This reminds me of our topic on How to redirect HTTP to HTTPS Using .htaccess and How To 301 Redirect, (AVOID DUPLICATE CONTENT SEO).

Now during our investigation, we realized that the ads.txt file does not redirect http://domain.com/ads.txt to https://domain.com/ads.txt instead it redirects to https://domain.com, meaning Google spider couldn't index the ads.txt file to ascertain it was being called properly. This can also mean the .htaccess for the domain canonicalization was misconfigured. Because from the example above by default if you were to visit http://domain.com you will be redirected to https://domain.com, hence not realizing the .htaccess code was misconfigured.

Sample of the misconfigured .htaccess redirect code


RewriteCond %{HTTP_HOST} ^seowebanalyst.com$ [OR]
# RewriteCond %{HTTP_HOST} ^www.seowebanalyst.com$
# RewriteRule ^index.php$ "https://www.seowebanalyst.com/" [R=301,L]

# RewriteCond %{HTTP_HOST} ^seowebanalyst.com$ [NC]
# RewriteRule ^(.*)$ https://www.seowebanalyst.com/ [R=301,L]

# RewriteEngine On
# RewriteCond %{SERVER_PORT} 80
# RewriteRule ^(.*)$ https://www.seowebanalyst.com/$1 [R,L]

Sample of the Correct .htaccess redirect code


RewriteEngine On

RewriteBase /

RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^seowebanalyst.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.seowebanalyst.com$
RewriteRule .* https://www.seowebanalyst.com%{REQUEST_URI} [R=301,L]

RewriteCond %{HTTPS} =on
RewriteCond %{HTTP_HOST} ^seowebanalyst.com$
RewriteRule .* https://www.seowebanalyst.com%{REQUEST_URI} [R=301,L]

After the integration and testing with several variances, we were able to redirect all path "/" files to their correct https://www version and this solved the Google Adsense Ads.TXT Error issue on our account.

You might need to replace your current robot.txt file with the sample code below and if you don't have one simply create it.


# robots.txt generated at https://www.seowebanalyst.com
User-agent: *
Allow: /
Disallow: /cgi-bin/
Allow: /
Sitemap: https://www.yourdomain.com/sitemap.xml

The other worthy mention will be to check your robot.txt file if it has a disallow function, most people ignore the function of their robot.txt file while others take full use of it like BuzzFeed did with theirs.

seo web analyst blogger community

Image illustration from Moz

For curiosity's sake, if you have done all the information above and still your Ads.TXT file error still persists, you might want to include the path in your sitemap.xml and submit it on Google search console, or you use the inspect URL function to submit your path to ads.txt file for quick indexing. There might be a delay to your issue being fixed due to your website not getting impressions or a low amount of ads are being served so doing the above might help to increase your validation time.

For other platforms like WordPress and blogger implementation of the Google Ads.txt file please visit Google's Adsense Inventory and if you will want to test your implementation of the Google Adsense Ads.txt file was done correctly, you should visit ads.txt validator or you Troubleshooting ads.txt issues

Google Adsense Ads.txt File on Subdomain

To get your Ads.txt file to be validated on subdomain's where you host your ads (if you don't run them from your primary domain), you need to still have the txt file copy on your main domain, after which you can apply the subdomain statement below;


google.com, pub-xxxxxxxxxxxxxxxx, DIRECT, f08c47fec0942fa0
subdomain=olatunjiadetunji.seowebanalyst.com
subdomain=instaforex-africa.seowebanalyst.com

you automatically redirect the indexing to go to the various subdomain to verify the ads.txt file, eg if you visit http://olatunjiadetunji.seowebanalyst.com/ads.txt (any version of the URL) you will find the Google Ads.txt file has the same code as in the main domain name, and also if you visit the other subdomain you will see the same code there, this is because we are running all our subdomains on a single file path (directory) and not on a separate file path. Another thing to take home is that using the subdomain entry allows you to run different and multiple pub-id on your subdomains either as a separate directory or as a single directory path.

With that said, if you want to optimize your earnings and execute ads match on your subdomains, let's say you are writing on different topics or they represent different categories, then you must add them to the Google Adsense subdomain Add site tab, you can read more Add or remove a subdomain in your sites list.

Fun Fact: The visits to the ads.txt files do not count as traffic, so there is simply no harm in visiting them by others unless you do not want them to download your files or see how many ad serving accounts you have, which makes no sense.


comments powered by Disqus

Ads

custom ads side bar

Author

authors image profile

Olatunji Adetunji

I am a seo web analyst and have a love for anything online marketing. Have been able to perform researches using the built up internet marketing tool; seo web analyst as a case study and will be using the web marketing tool (platform).

Subscribe RSS

Subscribe with Subscribe with facebook Subscribe with google Subscribe with linkedin Subscribe with TwitterSubscribe with Yahoo   

OR




This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

More Posts From Online Marketing Strategies


Random Blogs




Licensedclearing Agent
carauctions
Online Marketing Strategies
LicensedclearingAgent
carauctions
Licensedclearing Agent