Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

301 Redirect For A Wp Blog To A New Domain


  • Please log in to reply
7 replies to this topic

#1 Seastone

Seastone

    HR 2

  • Active Members
  • PipPip
  • 21 posts

Posted 25 March 2009 - 04:39 PM

I have a WP blog that's only about 1 year old with about 50 articles. I want to move it to a new domain. I suppose I could first setup WP on the new domain and use the export/import to transfer the posts, then shut down the old one.

But what's best to do about the 301 direct for the htaccess on the old domain?

Would it be just one entry like so:
CODE
Redirect 301 /index.php http://newdomain.com/index.php

Or should I do a 301 for each article like so:
CODE
Redirect 301 /2009/1/10/first-article http://newdomain.com/2009/1/10/first-article
Redirect 301 /2009/1/15/second-article http://newdomain.com/2009/1/15/second-article
Redirect 301 /2009/1/20/third-article http://newdomain.com/2009/1/20/third-article

etc etc

#2 Seastone

Seastone

    HR 2

  • Active Members
  • PipPip
  • 21 posts

Posted 25 March 2009 - 07:08 PM

Let me clarify - by "shutting down the old one" I meant that the old WP blog would be deleted (to avoid duplicate content) ...but the domain would still be there containing only just a htaccess file that 301 redirects to the new version.

#3 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 25 March 2009 - 09:28 PM

Is the structure going to be the same with just the domain name changing? That's what it looks like from your examples

If so, and assuming you're on an *nix/Apache server given your examples you should be able to redirect them all in one fell swoop.

CODE
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com [NC]
RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L]


Note: the above rewrite rule assumes you want to use the non-www version of the new domain since that's what you had above.

#4 Seastone

Seastone

    HR 2

  • Active Members
  • PipPip
  • 21 posts

Posted 26 March 2009 - 06:52 AM

Thanks, is there (speculating) any merit to one way or another from the Googlebot's perspective?

#5 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 26 March 2009 - 07:58 AM

Nope. they accomplish the same thing from the spider's perspective.

The only major difference being that the mod_rewrite version I mentioned above can used if you ever decide to park the old domain on top of the new domain, so that you wouldn't have to maintain hosting for the old domain to keep it working.

#6 Ron Carnell

Ron Carnell

    HR 6

  • Moderator
  • 968 posts
  • Location:Michigan USA

Posted 26 March 2009 - 10:02 AM

QUOTE
Is the structure going to be the same with just the domain name changing?

That's a key question and, I think, cause for caution.

Does WordPress's export/import function guarantee a mirrored database? Including primary keys? Dates? If you click on a perma-link on the old server, do we really know if the same perma-link will exist on the new?

I've never moved a WordPress database. I would be surprised, though, if there weren't a few hiccups?




#7 Seastone

Seastone

    HR 2

  • Active Members
  • PipPip
  • 21 posts

Posted 28 March 2009 - 09:13 AM

Thanks, I've only done 1 WP migration but iirc it kept the page names and structure the same.

One additional question.. suppose I want to use the old domain name for an entirely new type of site. I suppose THEN I'd have to do the whole series of 301's for each page that's now over at the new domian?

#8 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 28 March 2009 - 09:49 AM

QUOTE
suppose THEN I'd have to do the whole series of 301's for each page that's now over at the new domian?


Correct.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

We are now a read-only forum.
 
No new posts or registrations allowed.