Page 1 of 1

mod_rewrite question relating to seo

Posted: Fri May 11, 2007 10:37 am
by Luke
We just did a major overhaul on a website, and in doing so, changed the directory structure drastically. We switched from long ugly query strings to clean urls. What I'd like to know is what is the best way to tell google about my changed urls? mod_rewrite? My old URLS look like:

http://www.example.com/Merchant2/mercha ... y_Code=MDB

My new urls look like

http://www.example.com/product/verbose- ... oduct-name

I want to be careful not to screw anything up because our google rankings jumped drastically from this change, but there are still old urls indexed because we didn't take down the old store yet.

The thing is, the category names have changed, and I've added a product-name to the end of the url. I'd like to just tell google that anything pointing to /Merchant2 should just redirect to http://www.example.com with a 301 or something, but I don't really know the implications of that. SEO experts?

Posted: Fri May 11, 2007 11:39 am
by veridicus
I typically do a 301 through mod_rewrite in these situations for 3 reasons.

Usability. Users landing from an old URL they found through a search engine get to a useful, and hopefully very related, page.

SEO. 301 means moved permanently, which Google uses in the best way possible. If only the URL changes but the page content is almost identical Google doesn't seem to penalize. I've done it often with no problems. But if you're going to bounce to the home page I'd send a 404 so it's properly removed from the index and Google doesn't consider it duplicate content.

Performance. Taking care if it through mod_rewrite means no special code to handle it within the application and less hits to PHP.

Posted: Fri May 11, 2007 12:09 pm
by Luke
OK. I think I'll 404 since users can still get to the home page should they have difficulty and google is already indexing the new pages terrifically. Thank you!