301 Redirects

There are thousands of these posts out there already – I’m putting this here for my benefit more than anything else. Saves me from having to Google when I need to check how it should be done!

So – if you move a page and want it to be followed by a search engine (and keep it’s pagerank etc), open up your htaccess file and enter (all on one line):

redirect 301 /olddir/oldpage.html http://www.newsite.com.au/newdir/newpage.html

Or if you’re shifting a whole directory (again, all on one line):

redirect 301 /olddir/ http://www.newsite.com.au/newdir/

The 301 code says “moved permanently”, so don’t use it for temporary redirections. Obviously this htaccess stuff is for linux servers, if you’re on Windows then there’s a different way… But you’ll have to find that somewhere else!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s