Googleアドセンス ads.txtの警告の解決手順


不正広告防止のため、Googleは認定システムを導入したようで、アドセンスを実施するサイトにAds.txtを配置して、このサイトは正規だと証明してくれと言うのです。
というのを何となく知ってたんですが、聞き流していたところ、自分のアドセンスページに警告が出始め、対応しないと売上が消えるかもということで、試行錯誤が始まりました。これが、結構、長期にわたり解決できなかったのです。

まずはads.txt
こいつは、アドセンスのサイトメニューよりダウンロード可能です。
Create an ads.txt file for 1 site のDOWNLOADよりテキストファイルを落とします。
それがads.txt
内容は、下記が1行書かれています。
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0

広告配信はGoogle、サイトのID、ダイレクトに掲載、そしてID です。
それで、これをアドセンスを貼るサイトのルートに置きます。下記の場所。
https://xxxxx.com/ads.txt
まぁこれで、置いとけばクローラーがやってきて、エラーは解消され警告は消えるはず。
なのに、消えません。ここから格闘が開始。
僕の場合は、Aレコードが無く、Cnameでブログにルートドメインと、サブドメインに使っています。
これが混乱の始まり。
下記で利用中
quinbee.com と blog.quinbee.com これのルートにそれぞれAds.txtを置きました。
置き方は、Bloggerを使っていますので、Blogger → Settings → Search preferences → Monetization
ここにCustom ads.txtが置けます。

そして待つ。ずっと待ちましたが、警告は消えません。
挙句の果てに、アドセンスの申請の問題かと、何を思ったのかアドセンスから削除して再申請。
またも待つ。ずーーーーと待ちました。
2週間以上かかって、承認。ほっとすると、今度はまた警告。。。。うぬぬ。

それで、アドセンスのads.txt設置のガイドをとうとう読みます。
https://support.google.com/adsense/answer/7532444?hl=en

はてと。どこが違うんじゃい!と。
あ、何?サブドメインの場合を書いてる。
Google crawls and enforces ads.txt files placed on subdomains, where one exists, and is referenced from the ads.txt file on the root domain.

To reference a subdomain in your root domain ads.txt file, you add a subdomain= declaration. For example, let's say your ads.txt file for example.com needs to reference the subdomain subdomain.example.com. You'd add this line to your root domain ads.txt file: subdomain=subdomain.example.com. See the IAB ads.txt specification for additional details on subdomain referral.

ルートドメインにサブドメインを追記しろと。はぁー。まじでか。。。
subdomain=なんて知らんかった。
参照して、こつらの https://iabtechlab.com/ads-txt/
view ads.txt Spec Version 1.0.2 の見ると記述例があります。
これを追記するわけです。
subdomain=subdomain.example.com

最後に追記しまして、待つこと数日。警告は消えました。
長かったが、解決に夢中になり、特に投稿はしていないという本末転倒なことになっております。
皆様もAds.txtにはご注意下さい。





Next Post Previous Post
No Comment
Add Comment
comment url