Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-slimstat domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/kusanagi/u-ff.com/DocumentRoot/wp-includes/functions.php on line 6121
Google Search Consoleで「参照しているAMP URLはAMPではありません」というエラーが表示される場合の対処方法 | 3分ニュース: にゃんぷん

Google Search Consoleで「参照しているAMP URLはAMPではありません」というエラーが表示される場合の対処方法

この記事は約1分で読めます。

Google Search Consoleで「参照しているAMP URLはAMPではありません」というエラーが表示される場合の対処方法

Google Search Consoleの画面に
参照している AMP URL は AMP ではありません
というエラーが表示されるようになった

原因を調べるとkusanagiのbcacheを使用しているせいだった

通常のAMP

通常だと

https://u-ff.com/xxx/?amp=1

みたいなURLにアクセスすると

https://u-ff.com/xxx/

というページをAMP化したhtmlが返ってくる

kusanagiのbcache

kusanagiのbcacheをオンにした場合、URLの?以降のパラメーターを無視してキャッシュを返してしまう

よって、ampの効果が無視されてPC用のキャッシュデータを返してしまう

その結果、
参照している AMP URL は AMP ではありません
というエラーが表示されるようになる

kusanagiでbcacheをオフにする方法

kusanagi bcache off

上記のkusanagiコマンドでbcacheをオフにできる

コメント

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny

タイトルとURLをコピーしました