サーチコンソールにて大量のリダイレクトエラーが発生しているのですが
そのほとんどが
①https:// aaa.com/aa.html/bb.html
といった意味不明な参照先となっております。
当該ページ(https:// aaa.com/aa.html)を確認したところ
<a href='bb.html'></a>
というリンクは存在しました。
google bot はこれを下記のように判断したのでしょうか?
https:// aaa.com/aa.html/bb.html
<a href='./bb.html'></a>
こう書くとエラーは消えるのでしょうか
また同様に
②https:// aaa.com/cc.html/dd.html
といったリダイレクトエラーの箇所は
https:// aaa.com/cc.html内に、javascriptによるdd.htmlへのジャンプメニューが存在しますが、
https:// aaa.com/cc.html/dd.htmlというリンクは存在しません。
補足.htaccessの設定です
AddType application/x-httpd-php .html .js .inc RedirectMatch gone ^/apple-touch-icon* <IfModule mod_deflate.c> SetOutputFilter DEFLATE #古いブラウザ対策 BrowserMatch ^Mozilla/4.0[678] no-gzip BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch \bMSIE\s(7|8) !no-gzip !gzip-only-text/html #画像は圧縮しない GIF、JPEG、PNG、ICO SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png|ico)$ no-gzip dont-vary </IfModule> #検索エンジンのUserAgentを環境変数に代入 SetEnvIf User-Agent "Googlebot" allowbot SetEnvIf User-Agent "msnbot" allowbot SetEnvIf User-Agent "bingbot" allowbot SetEnvIf User-Agent "Slurp" allowbot SetEnvIf User-Agent "Y!J" allowbot SetEnvIf User-Agent "archive.org_bot" allowbot #一旦、すべてのアクセスを拒否 order deny,allow deny from all #検索エンジンからのアクセスを許可 allow from env=allowbot allow from googlebot.com allow from google.com #許可するIPアドレスを一覧で記述 allow from 1.0.16.0/20 allow from 1.0.64.0/18 allow from 1.1.64.0/18 ・・・省略
.htaccessないし、サーバーのアパッチの設定コードを記載してください。
サーバーの設定が怪しい気がします。
もしくは、そういった形式でリンクされている可能性もあります。
(昔流行ってた検索エンジン系サイトのリンク形式がおかしくてそうなってしまってる、とか)
ありがとうございます。
補足として.htaccessの内容を本文に追記しました。
ページ内でJavaScriptは動作していますか?
はい、動作しております
あ、書いてありましたね。失礼しました。
location.href などを操作しているかと思いますが、その部分のコードをご提示いただけますか?
ジャンプメニュー部分です。
<script>
function selectmenu(linkLoc) {
if(linkLoc !="") {
window.location.href=linkLoc;
}
}
</script>
<select onchange="selectmenu(this.options[this.selectedIndex].value)">
<option value='bb.html'>bb</option>
</select>
うーん、問題なさそうですね。
canonical や RSS、サイトマップ とかはいかがでしたか?
あ、それかもしれません
aa.htmlに
<link rel="canonical" href="https://aaa.com/aa.html" />
と記載していますので、ここでのリンク(bb.html)がhttps://aaa.com/aa.html/bb.htmlとbotは思ってしまっているということでしょうか
あなたの回答
tips
プレビュー