LoginSignup
1
2

herokuでads.txtとapp-ads.txtを認証してもらう方法

Last updated at Posted at 2023-03-04

概要

herokuで独自ドメインでサイトを公開した場合、www.example.comがというようにwwwがついてしまう。
しかし、adsenseやadmobがads.txtやapp-ads.txtをクロールして読み込むドメインは、example.com/ads.txtである。
このせいでクロールが上手くいかず、ずっとAd周りで警告が表示され続けている人は多いのではないだろうか?
その解決策をメモる。

解決策

CloudflareのPage Ruleを使って、www.example.com/ads.txtをexample.com/ads.txtにリダイレクトしよう。

スクリーンショット 2023-06-24 10.54.54.png

以上である。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2