我有一个AMP故事页面,即使AMP验证程序通过它也是有效的,Google AMP测试也会提示我它无效,并显示URL marked 'noindex'
的索引错误。
很明显,我在页面内容上没有任何noindex元,而且我不知道为什么Google AMP测试无法验证故事。
任何线索将不胜感激!
这不是页面内容引起的,而是HTTP标头引起的。该页面的标题是:
HTTP/1.1 200 OK =>
Date => Wed, 05 Feb 2020 16:39:25 GMT
Server => Apache
Cache-Control => max-age=0, must-revalidate, private
pragma => no-cache
expires => -1
X-Robots-Tag => noindex
Access-Control-Allow-Origin => *
Access-Control-Allow-Headers => authorization, origin, user-token, x-requested-with, content-type, Content-type
Access-Control-Allow-Methods => PUT, GET, POST, DELETE, OPTIONS
Connection => close
Content-Type => text/html; charset=UTF-8
X-Robots-Tag => noindex
使Google的AMP测试服务无法获取您的页面以评估其是否有效。删除此标头应该可以解决问题。