AMP-html page not displaying as intended in Google Search

给你一囗甜甜゛ 提交于 2019-11-29 11:56:33

The use of AMP pages is limited at present. Google search results for example will not display the AMP equivalent instead of your page.

One place they are implemented is in a carousel of "Top Stories". This carousel will link to the AMP pages and will display in addition to the regular search results (which will continue to link to the non-AMP version - Edit: not true anymore as per above). This will only display pages for NewsArticle postings, and only when the search is deemed by Google to be likely to require a list of recent news (so a search for your company is unlikely to display this). Do a search on something in the news recently and you should see a Top Stories carousel and a the lightning bolt next to some article of the articles. Note this hasn't yet rolled out everywhere so try Google.com rather than Google.nl if you're not seeing this.

So the main benefit to implementing AMP at present is for news organisations.

Will this change? It's likely. Twitter have stated they will start to use the AMP versions, Google may use it more (though not sure if they will ever replace the main search listings) and others may follow.

As to your problem with the script tag in the cached version I don't see that issue. Note that the cached version isn't updated very often so it's not "live". So if you have an error, visit the cached URL, it will load it and display the error. However if you then fix the error and refreshed the cached URL it will still show the error. You just need to wait a day or two until it falls out of the cache and try again. They're working on a better way to control this (though seemed to have closed the issue tracking this).

Edit: A lot has changed since the time of writing this answer. Now amp pages DO show in main search results - at least for mobile. So there is now a benefit beyond news organisations. However will leave the answer as is as it did answer the user's question at the time.

A good thing to use is the Structured Data Testing tool and check the requirements to show in Google Search here:

https://developers.google.com/structured-data/carousels/top-stories#top_stories_with_amp_in_google_search

It looks like one potential issue is that you're using ScholarlyArticle, but at the moment Google only explicitly lists Article, NewsArticle, or BlogPosting. You might try using the more generic Article type and see if that works.

If that doesn't work, good place to get help is in the Webmaster Central Forums and in the AMP Error Reports in Search Console.

If you are referring to the page on cdn.ampproject.org not validating, in other words https://cdn.ampproject.org/c/amptest.millerpreview.nl/indexamp.html#development=1 showing errors in the dev console, this is intended. cdn.ampproject.org rewrites the javascript URL to a specifically versioned one that has a longer cache lifetime. This means that the transformed document is no longer valid, but that's OK. Your document is still considered valid.

See https://cdn.ampproject.org/c/example.com/ to get an example of what would happen if your page was actually invalid AMP.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!