1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Do I need to do a 301 redirect after creating SEO links?

Discussion in 'White Hat SEO' started by chuckconnors, Feb 11, 2010.

  1. chuckconnors

    chuckconnors Newbie

    Joined:
    Feb 9, 2010
    Messages:
    8
    Likes Received:
    1
    Hey guys, I'm a bit confused. Here's what I did for one of my sites (a joke site):

    old url format:
    /jokes/30.php

    new url format after using mod rewrite rules in .htaccess:
    /jokes/30-The_Lawyer_and_the_engineer_joke.php

    I've cut out the sitename portion to adhere to the forum rules about linking

    Now this works fine for all my joke pages. I'm pulling the joke title out of the database and adding it to the jokeid.

    The question I have is do I need to somehow do a 301 redirect for all requests coming in from:

    /jokes/30.php

    and send them to:

    /jokes/30-The_Lawyer_and_the_engineer_joke.php

    I'm concerned that I will be penalized for duplicate content as the /jokes/###.php files are already indexed. Is that true?

    If I do have to use a 301 redirect, can someone tell me how I can do this using the example urls I've mentioned above? I've tried a few things on one page but haven't had any success. I guess I can make one entry per url in the .htaccess file?

    Any help would be greatly appreciated. Thanks.
     
  2. xbada

    xbada Junior Member

    Joined:
    Jul 31, 2009
    Messages:
    102
    Likes Received:
    118
    Occupation:
    full time im
    Location:
    usa
    Yes, it is generally very stupid to change your link structure when you have already been building backlinks.

    heres a quick tutorial..

    1. If you don't have a .htaccess file in your root directory, open a new text file. If you do have one there, open it for editing.
    2. At the bottom of the file, add the line:
      Redirect 302 /PATH_TO_REDIRECT NEW_LOCATION_URI​
    3. Change "/PATH_TO_REDIRECT" to the directory path on your Web server you want redirected.
    4. Change "NEW_LOCATION_URI" to the URL path you want the pages redirected to.
    5. Save your .htaccess file and upload it to the root of your Web server.
    6. Test your redirect by going to the old path in a Web browser. You should be taken automatically to the new path.
     
  3. chuckconnors

    chuckconnors Newbie

    Joined:
    Feb 9, 2010
    Messages:
    8
    Likes Received:
    1
    Thanks for the speedy reply. Will the above actually forward the user to that url (change in the location bar) or is it only for the SE spiders?

    The reason that I ask is that I put it in my .htaccess and I'm not seeing any changes in my browser's location bar.

    Also, wouldn't I want to use a 301 as this is where I want things to appear permanently?
     
  4. Dangazzm

    Dangazzm Regular Member

    Joined:
    Jan 9, 2010
    Messages:
    230
    Likes Received:
    21
    Is it a Wordpress blog? I was a newbie and did this as well... Exploded my site, G sending me warnings about my site being unreachable... it was a mess rofl. Anyways there was a pretty simple, yet complex plugin which fixed everything.