Jump to:

22992 Posts in 11842 Topics by 2828 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, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 1665 Views
  • Ku$h
    Avatar
    Community Member
    14 Posts

    SS doing a SEO no,no... Duplicate content! Link to this post

    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.

  • DesignerX.com.au
    Avatar
    Community Member
    107 Posts

    Re: SS doing a SEO no,no... Duplicate content! Link to this post

    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

  • Devlin
    Avatar
    Community Member
    186 Posts

    Re: SS doing a SEO no,no... Duplicate content! Link to this post

    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.

  • Ku$h
    Avatar
    Community Member
    14 Posts

    Re: SS doing a SEO no,no... Duplicate content! Link to this post

    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.

  • Devlin
    Avatar
    Community Member
    186 Posts

    Re: SS doing a SEO no,no... Duplicate content! Link to this post

    Well, the best place 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.

  • Greg1
    Avatar
    Community Member
    28 Posts

    Re: SS doing a SEO no,no... Duplicate content! Link to this post

    Rel=Canonical will fix the SEO problems and is easy to implement.

  • Ku$h
    Avatar
    Community Member
    14 Posts

    Re: SS doing a SEO no,no... Duplicate content! Link to this post

    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.

  • simon_w
    Avatar
    Forum Moderator
    467 Posts

    Re: SS doing a SEO no,no... Duplicate content! Link to this post

    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);
       }
    }

    1665 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.