nickf
nickf

Reputation: 546243

Upgrading a site with SEO in mind

I'm managing an established site which is currently in the process of being upgraded (completely replaced anew), but I'm worried that I'll lose all my Google indexing (that is, there will be a lot of pages in Google's index which won't exist in that place any more).

The last time I upgraded a (different) site, someone told me I should have done something so that my SEO isn't adversely affected. The problem is, I can't remember what that something was.


Update for some clarification: Basically I'm looking for some way to map the old paths to the new ones. For example:

And when Google gets around to crawling the site again...

There won't be a simple 1:1 mapping like that, it'll be more like (old) index.php?page=awesome --> (new) index.php/pages/awesome, so I can't just replace the contents of the existing files with redirects.

I'm using PHP on Apache

Upvotes: 0

Views: 238

Answers (3)

dylanfm
dylanfm

Reputation: 6345

301 redirect all your old (gone) pages to the new ones.

Edit: Here's a link to help. It has a few links to other places too.

Upvotes: 4

majelbstoat
majelbstoat

Reputation: 13399

You need to put some rewrite rules in an .htaccess file.

You can find lots of good information here. It's for Apache 1.3, but it works for Apache 2, too.

From that article, a sample for redirecting to files that have moved directories:

RewriteEngine on
RewriteRule   ^/~(.+)  http://newserver/~$1  [R,L]

This reads:

  • Turn on the rewrite engine.
  • For anything that starts with /~, followed by one or more of "anything", rewrite it to http://newserver/~ followed by that "anything".
  • The [L] means that the rewriting should stop after this rule.

There are additional directives that you can use to set a [301] redirect

You could do:

RewriteEngine on
RewriteRule   old_page.php  new_page.php  [L]

But you'd have to have a rule for every page. To avoid this, I'd look at using Regular Expressions, as in the first example.

Upvotes: 3

Federico A. Ramponi
Federico A. Ramponi

Reputation: 47075

You can tune Google's view of your site, and probably notify its changes, from within Google Webmaster Tools. I think you should build a sitemap of your current site, and have it verified when the site changes.

Upvotes: 2

Related Questions