18591 Posts in 4875 Topics by 2285 members
General Questions
SilverStripe Forums » General Questions » SS doing a SEO no,no... Duplicate content!
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
| Go to End | Next > | |
| Author | Topic: | 698 Views |
-
SS doing a SEO no,no... Duplicate content!

9 December 2011 at 9:11pm Last edited: 9 December 2011 9:12pm
Hi, my SEO friend has just pointed out to me that SS is creating duplicate content by the way it serves pages. make
Eg. www.mystite.com/contact.php and www.mysite.com/contact/Both of these pages are 'spiderable' by Google and can make their way in to the Google index. This is particularly bad when you upgrade to SS from an old site. If the previous site used .php files, these would remain in the index and the new SS versions added also.
For example:
Google would treat the old www.mysite.com/services.php page as a different page to www.mysite.com/services/
Even though they are the same page in the new SS site.The answer is to 301 the .php version to the non PHP version, but I cannot find any leads on doing this. Any ideas?
I don't know if this is a known issue. I've scoured the web for an answer but cannot find any discussion on the topic.
If you don't know about Google's penalisation of duplicate content (it's really important to know) do a Google for Google Panda update or Google farmer update.
Cheers.
-
Re: SS doing a SEO no,no... Duplicate content!

9 December 2011 at 9:18pm
Hi,
I never noticed that SS does have 2 versions of each page ..
anyway, Google's penalisation of duplicate content only apply (as far as i know ) to duplicate content in different Domains , & duplicate content on the same website my considered as 'Keyword spamming" (after few month of the website being live ).anyway, it will be good to know how to direct the .php to a Non-.php url ..
Subscribed & waiting for a reply ;)Mikel
-
Re: SS doing a SEO no,no... Duplicate content!

9 December 2011 at 10:44pm Last edited: 10 December 2011 5:00am
I don't think this is really an (edit: silverstripe) issue. You can use any suffix you like and append any $_GET variable with ? and & to the url. Create a proper sitemap for google and use vanilla links inside the page and I'm sure you have no problem with duplicated content.
-
Re: SS doing a SEO no,no... Duplicate content!

10 December 2011 at 2:22am
I've just spoken to my SEO friend and he disagrees. He's noticed 'through fixing duplicate content on our sites so in my experience, on-domain duplicate content is an issue.'
That's the problem with SEO. Nobody actually knows anything for certain, you can only go on your experience and what you can test for. For us, this is an issue. Particularly because we have the .php versions in the Google index and we want the 'heat' from these pages to 301 to the new pages.
-
Re: SS doing a SEO no,no... Duplicate content!

10 December 2011 at 4:52am Last edited: 10 December 2011 5:40am
Well, the
bestplace to redirect 301 is the init method of the page controller. Search for any suffix in $_SERVER['REQUEST_URI'], wipe any data you don't want and redirect it.Edit: Or prep your .htaccess file accordingly.
-
Re: SS doing a SEO no,no... Duplicate content!

12 December 2011 at 11:20am
Rel=Canonical will fix the SEO problems and is easy to implement.
-
Re: SS doing a SEO no,no... Duplicate content!

12 December 2011 at 11:56pm
Thanks for the feedback. We've implemented some rel='canonical' links but my SEO friend informs me that this really needs a proper fix.
We think refining the .htaccess is the correct place to do this, not the page controller (as it's the .htaccess open ended rule that's causing the issue).
Nobody at our office is a .htaccess guru so if anyone knows how to tighten up this rule so it doesn't serve pages with an extension (.php, .html, .any-thing-you-like) then we'd be very grateful for the help.Thanks.
-
Re: SS doing a SEO no,no... Duplicate content!

13 December 2011 at 10:03am
It's easiest to actually do this in your Page_Controller init() method so that you don't need to handle exceptions (sitemap.xml, *.css, *.js, sapphire/main.php, etc).
Something like:
public function init() {
parent::init();
if($this->request->getExtension()) {
$url = $this->request->getURL();
$url = substr($url, 0, strlen($url) - (strlen($this->request->getExtension()) + 1));
return $this->redirect($url, 301);
}
}
| 698 Views | ||
| Go to Top | Next > |




