Amphtml: send canonical url in `documentLoaded` messaage.

Created on 17 Jan 2017  路  7Comments  路  Source: ampproject/amphtml

Short description of your issue:

Send canonical url in documentLoaded message.

This is to support Viewers so they can providing links, sharing, etc. to the canonical.

What browsers are affected?

All browsers

viewers

Most helpful comment

Yes, but not necessarily in every case.

Using rel=share to explicitly specify the sharing URL seems like a good idea.

All 7 comments

@muxin Could you please add? Canonical can be found by executing:

documentInfoForDoc(...).canonicalUrl

Ok, will do.

Ah, the canonical will yield very misleading results if you plan to use if for branding and or content identification. The canonical references the original source of the content not the page. Example we have papers who syndicate articles from other papers in the group, say a Sac Bee article running under the Fresno Bee brand - if you use the canonical (Sacramento Bee) url rather than the source (Fresno Bee) url you'll get the wrong brand.

@jpettitt: Canonical for the AMP doc should be the Sac Bee's rebranded HTML article, which should have a canonical to the Fresno Bee. Maybe we should clarify that https://github.com/ampproject/amphtml/blob/eda679bb3ca77908cb0cfb40e3fee91f0da4a37d/spec/amp-html-format.md#canon?

/cc @cramforce

Whoa, that's not what every SEO article on duplicate content says. We've always been told there should be exactly one canonical source for a content item. What you're saying implies that canonical links can chain back to the original. We can make that change, however before I do can you confirm, officially on behalf of Google, 100% that there are no negative SEO implications to doing that?

Edit: Also in the case where a site is AMP native but the content is syndicated to the site the fact that you are overloading canonical to mean two different things presents a problem as the search side want's it to point to the original syndication source but the AMP documentation says it should point to itself.

This is, uhm, interesting. Google Search e.g. already redirects the viewer URLs to the "canonical" of the page.

With larger context (also native sharing in browser), I think supporting <link rel=share> to be explicit about what URL a publisher wants shared would be good. How do people feel about that as taking precedent over the canonical?

@ericfs I'm wondering: Don't you typically have this info already, anyway?

Regarding the issue itself: We are switching to sending up all rels, right?

Yes, but not necessarily in every case.

Using rel=share to explicitly specify the sharing URL seems like a good idea.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

edhollinghurst picture edhollinghurst  路  3Comments

gmajoulet picture gmajoulet  路  3Comments

aghassemi picture aghassemi  路  3Comments

sryze picture sryze  路  3Comments

Download picture Download  路  3Comments