如何解决:引用的 AMP 网址不是 AMP [英] How to fix: Referenced AMP URL is not an AMP

查看:37
本文介绍了如何解决:引用的 AMP 网址不是 AMP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

搜索控制台添加了一系列引用的 AMP URL 不是 AMP"的问题.

如果我使用

但是,当我查看

以下是 Search Console 认定为无效 AMP 页面的一些网址的列表:

我不明白 Google 希望我解决什么问题.

解决方案

原来我有几个问题.

首先,我需要更正 AMP 版本和标准版本页面之间的所有链接.

在那之后,Craig Scott 对重定向是正确的,它违反了 Google 搜索指南AMP 重定向来自台式机或平板电脑的流量.

但是,我遇到了另一个与 AMP 上的代码没有直接关系的大问题.

我们正在使用 Prerender 来帮助爬虫读取我们用 React 渲染的页面的内容,但它返回了一个无效的AMP 网页的抓取工具的网页版本.

为了解决最后一个问题,我将 AMP 页面(甚至不使用自定义 JS!)列入黑名单以进行预渲染.

Search console added a bunch of issues with "Referenced AMP URL is not an AMP".

If I use the AMP Test I get:

However, when I check in https://validator.ampproject.org/ it shows:

Here is a list of some of the URLs that the Search Console says are not valid AMP pages:

I don't understand what Google expect me to fix.

解决方案

It turned out that I had several issues.

First I needed to correct all the links between the AMP version and the standard version of the pages.

After that, Craig Scott was right about the redirection, it was against the Google Search guidelines for AMP to redirect the traffic that came from desktop or tablet.

However, I had another huge problem not directly related to the code on AMP.

We are using Prerender to help crawlers read the content of our page rendered with React, but it returned an invalid version of the page to the crawler of the AMP pages.

To fix this last issue I blacklisted the AMP pages (that doesn't even use custom JS!) for prerender.

这篇关于如何解决:引用的 AMP 网址不是 AMP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆