Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[2011-08-10] Trailing Slash Canonical Issue #327

Closed
silverstripe-issues opened this Issue Apr 3, 2013 · 3 comments

Comments

Projects
None yet
2 participants

created by: rich@gpmd.co.uk
created at: 2011-08-10
original ticket: http://open.silverstripe.org/ticket/6700


Trailing Slash Canonical Issue

http://www.gpmd.co.uk/blog
redirects to:
http://www.gpmd.co.uk/blog/?url=/blog

and this URL is also indexed:
http://www.gpmd.co.uk/blog/

We understand that this is because there is a module installed called /blog but this has a large impact on SEO.

The trailing slash canonical issue means that there are two versions of each page of a website. As these two pages are identical apart from the slash, Google will crawl both pages and devalue them both as a result of duplicate content.

Also, when people link to the different URLs, only those links going to the primary version of the page will influence rankings.

This why there should be a re-write rule that automatically 301 redirects one version to the other, carry pagerank or link juice with it.

comment by: @wilr (wrossiter)
created at: 2011-08-15


We've run into this issue as well with duplicate stats and pages in search results.

I basically wrote an custom handleRequest for Page_Controller that checked for the slash, if it didn't exist it would 301 so it would contain a slash - http://pastie.org/2373435.

After adding this to 2.4 and running all the tests nothing broke, also applied it to a dev site and noticed no major issues. I'll submit this as a pull request to core and get the core devs to review.

comment by: @chillu (ischommer)
created at: 2011-10-18


Unsetting milestone

Contributor

simonwelsh commented Mar 16, 2014

Duplicate of a couple of framework issues.

@simonwelsh simonwelsh closed this Mar 16, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment