Internal links on AMP pages

。_饼干妹妹 提交于 2019-12-11 07:47:27

问题


Many topics on this but can't find a straight answer. How do I hard-code an internal link on my fully AMP validated website?

Relative links seem to be converted to absolute. Do I have to link directly to the www.google.com/amp/s/ url?

UPDATE: I tried that, and it just redirects to my canonical link. Are we simply not supposed to use internal links?


回答1:


Officially, AMP-to-AMP linking is not supported inside the Google AMP Viewer. Theoretically, it's possible to link to the version on the AMP cache (using the AMP Cache URL scheme https://example-com.cdn.ampproject.org/c/s/example.com).

However, the idiomatic way to use AMP would be to link back to the canonical version (or AMP version) on your own origin.



来源:https://stackoverflow.com/questions/57483723/internal-links-on-amp-pages

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