Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to tell Google a page has moved?

Tags:

seo

We have #1 and #2 spots we would like to keep, but because of the way things were jumbled we have to migrate to a new domain.

We do not want the new domain to be penalized for duplicate content, we want it to naturally take the spot on Google.

How do we tell Google our page has moved?

like image 773
Pirate for Profit Avatar asked Apr 18 '10 09:04

Pirate for Profit


1 Answers

301 redirects are the recommended way to do this according to Google themselves. I tend to perform 301's using a .htaccess file (a few different methods here) but it can also be done using PHP like this:

header('Location: '.$newlocation, true, 301)
like image 68
robjmills Avatar answered Jan 03 '23 17:01

robjmills