ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Want to drop index.php without damaging search rankings

November 25, 2009 9:44am

Subscribe [2]
  • #1 / Nov 25, 2009 9:44am

    Andy Williamson

    16 posts

    I want to change my site URL structure without loosing page rank and SERP positions if possible?

    My current URL’s all have index.php in them:

    eg: http://www.shelteroffshore.com/index.php/property/

    I want to change this to

    http://www.shelteroffshore.com/property/ with the index.php removed.

    I know technically how to do this but don’t know about the correct/best way to redirect with a view to not damaging my SE positions.

    I’m guessing a 301 redirect of some description, but I’m a little concerned about implementing anything that would have a dramatic negative effect on rankings.

    Has anyone got any experience with droping the index.php while maintaing search rankings and creating redirects?

    Moved to HowTo by Moderator

    Any help tips greatly appreciated

    Andy

  • #2 / Nov 25, 2009 9:47am

    Sue Crocker

    26054 posts

    Hi, Andy.

    This is more of a General or HowTo kind of question. I’m leaning more towards HowTo. Let’s have the community help out on this one.

  • #3 / Nov 25, 2009 9:56am

    Andy Williamson

    16 posts

    Thanks Sue, the EE side is quite clear in terms of removing the index.php, it’s the 301 redirects and reducing impact on my SERPS that I would really appreciate any help and advice with.

    Andy

  • #4 / Nov 25, 2009 10:12am

    ender

    1644 posts

    well #1 you don’t really have to worry about 301 redirects because the urls with index.php in them are still valid urls, unless your htaccess rewrite is a lot different than mine.

    so that just leaves the issue of duplicate content and getting the right version of the page listed in the SERPs. For that I’d use a canonical link tag.  you could embed a template in the <head> of all your pages that has php enabled:

    <?php
        $page_uri = str_replace("index.php/", "", $_SERVER['PHP_SELF']);
        print "<link rel=\"canonical\" href=\"{$page_uri}\" />";
    ?>
  • #5 / Nov 25, 2009 11:43am

    Andy Williamson

    16 posts

    Thanks Ty, this sounds like a great idea that I hadn’t considered. There’s one part I don’t quite understand, could you please explain.

    I’ve removed the index.php and on the pages added the canonical link tag so regardless of whether a person enters mydomain.com/index.php/mypage or mydomain.com/mypage they end up on the same page, that bit I understand.

    How does the search engine deal with that change? Will it spider my site and then update to reflect the new URL and transfer PR and ranking weight accordingly?

    For example when the bot spiders an external site which has the original index.php based URL will it recognise the link tag and understand that the URL has changed and add the weight that back link provides to the changed URL.

    Duplicate content is a big concern and loosing valuable back links from external sites to certain articles would be a bit of a disaster.

    thanks for your help

    Andy

  • #6 / Nov 25, 2009 12:03pm

    ender

    1644 posts

    that’s what the canonical link tag is for.  that’ll tell the spiders that you have a new preferred url for that content.  it *won’t* perform a redirect to the non-index.php version of the page, so the index.php pages will continue to exist and be used by old bookmarks, old links to your site, etc.  but it won’t matter because the engines will be sending new traffic to your non-index.php pages and ascribing any value that the index.php pages have to their new non-index.php counterparts.

  • #7 / Nov 25, 2009 12:09pm

    Andy Williamson

    16 posts

    Thanks Ty I understand now, that’s so much less messy than the solution I had planned.

    cheers

    Andy

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases