Closed radzhome closed 3 years ago
This sounds like a crawler issue. Not sure how this is actionable by AMP.
Is it possible that the that now is rendered in its own DOM, can be pulled from the DOM itself so the raw unrendered template is no longer available? Not sure if that is possible or the effort involved. That would indeed prevent the crawler from seeing it.
I don't think so because a template may shared by multiple elements and be used after page load. Also, even if we tried that there'd be unpredictability due to the race between page render and crawl.
We face the same problem and found two possible workarounds:
<button on="tap:AMP.navigateTo(...)>
instead of links. That needs some workarounds if you need to generate URLs (see #23891 ).<script type="text/plain" template="amp-mustache">
syntax instead of <template type="amp-mustache">
. Downside is that it looks like the amp validator does not see (and validate) the content (this was our workaround for #23731 )..Edit: I forgot to mention that these two workarounds hide the links from the bot. If you want the rendered links to be indexed, that won't work..
This bug should probably be routed to the support forum for Google Search Console or whichever corresponding tool that's showing these errors. <template>
tags are not unique to AMP so this is probably a common issue.
Out of curiosity, do these malformed links in template
tags cause a behavioral change in SEO for your sites? Or can they be safely ignored (as far as you can tell)?
Out of curiosity, do these malformed links in template tags cause a behavioral change in SEO for your sites? Or can they be safely ignored (as far as you can tell)?
Biggest issue for us is that it might be irritating for the users, as the links appear in the index (Text-Version; e.g. at the bottom of this page). The SEO impact is hard to guess. In our case we had some admin links generated in a loop, which eat up crawling budget, so this is a very indirect impact..
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
I am facing the same issue and google crawler is giving 404 after crawling the template anchor tag URLs Apart from the workarounds mentioned above is there any proper solution to this issue?
Please only file reports about bugs in AMP here.
If you have a bug for AMP please fill in the following template. Delete everything except the headers (including this text).
What's the issue?
If you have a link coming from the template in your code, such as this (see {{ get_amp_long_url }}):
The rendered url is all good but the template with the raw code still stays in the DOM, see here:
The
<template type="amp-mustache">
is not displayed but still in there and crawlable by bots. So that said, google bots try to index it as:https://beta.canada.com/travel/international-travel/a-taste-of-australias-hunter-valley/wcm/a540a92b-95df-41b0-9f3d-e87a78b2f5d8/amp/{{ get_amp_long_url }}
If you put a
rel="nofollow"
on the links within the template, the rendered links will also not be indexable.How do we reproduce the issue?
Please provide a public URL and ideally a reduced test case (e.g. on jsbin.com) that exhibits only your issue and nothing else. Provide step-by-step instructions for reproducing the issue:
What browsers are affected?
Google index bot, not specific to browser
Which AMP version is affected?
https://cdn.ampproject.org/v0/amp-mustache-0.2.js