seo-bundle icon indicating copy to clipboard operation
seo-bundle copied to clipboard

Allow to specify canonical links

Open wouterj opened this issue 11 years ago • 5 comments

This is a follow up of #167 The video linked in that issue, by Matt Cutts, talks about a lot more usages of the canonical links than just replacing the redirect. Even more, it recommends against using canonical links to replace the redirect, but recommend to use it in other cases.

We should add an extractor for the canonical links imo.

wouterj avatar Jul 20 '14 10:07 wouterj

Is this related to #132 or can we do a sitemap with the current stuff? the sitemap should consist of only the canonical links i assume?

dbu avatar Nov 03 '14 20:11 dbu

Think for the Sitemap its only interessting wether a content is a duplicate or not. So it would be interessting to just ask: "do you have an orignal route or not" the decission how to display the duplicate content is an other question. So for creating the sitemap i would need a sane identifier for all non duplicate contents.

I am with @WouterJ when implementing an mechanism for supporting canonical links. As first task i would like to do an BC break and handle duplication by an redirect as default instead of an canonical link. btw: we should use absolute routes for the both - canonical and redirect. Atm we don't.

ElectricMaxxx avatar Nov 07 '14 09:11 ElectricMaxxx

indeed there are 2 points that are only semi-related. we do need to know which url on a content is the "canonical" one, if there are several for the same locale. this is a blocker for both something that handles canonical links (either redirect or show a meta tag) and an impediment for the sitemap. i

i think what we need:

  • "something"(tm) to indicate the canonical route in a bunch of routes returned by the content. or an additional interface to get only the canonical routes (1 per language). probably not information to be stored on the route but on the seo content...
  • the cmf router should detect this interface in https://github.com/symfony-cmf/Routing/blob/master/ContentAwareGenerator.php#L180 and use it instead of just getRoutes on the content.
  • seo bundle could use the same interface to generate the canonical url for the meta in the header
  • additionally we could provide a redirect service for canonical url that can be activated if wanted. this is a last step to me and not sure if its needed.

dbu avatar Nov 07 '14 10:11 dbu

Is that really relevant for the new release?

ElectricMaxxx avatar Jul 30 '15 22:07 ElectricMaxxx

unless you have some great idea how we can do this extremely simple, i would rather remove the milestone. we should not add new large chunks of work, rather release a solid sitemap implementation first. and if nobody needs that feature atm, i would not bother working on it. features that are actually used tend to become more meaningful than theoretical ideas. (i think it was a real scenario for you when we talked about it, but not anymore)

dbu avatar Jul 30 '15 22:07 dbu