We are in process to migrate old old domain to new domain using wordpress. this migration is happening on the same server and IP (need to confirm but still 99% sure). I have already asked same question few time back on pro-webmaster preserve-search-engine-index-while-shifting-to-new-domain. Since the database is same, all we did is export the data from old database to new database changed the link and now everything is perfect.

i know about that we can set 301 redirect in the .htacces file but not sure how to do this, and since there are so many links in the old domain. i am not sure how best we can handle this redirect. Do we need to create a mapping for each old URL to new URL? and where we should put these mapping in the Old domain? any help in this regard will be much helpful.If i need to provide more information, please let me know i will put any other required information in post.

Thanks in advance

1 Answer 1


If you use the Redirection plugin, you can just setup a regex redirect from (www.)?olddomain.com to www.newdomain.com (you should be using www., it's better for SEO as it helps page load time. and that single rule should pretty much do it for you.

You can do this same thing in .htaccess, and it would be more efficient, but I couldn't tell if you had the capability for that or not, rewrite rules as follows should get you most of the way there (assuming you have the capability):

Options +FollowSymLinks 
RewriteEngine on
RewriteRule (.*)$ http://www.newdomain.com/$1 [L,R=301]
  • don't i have to map individual URL's to respected new URL's Feb 13, 2012 at 16:33
  • i am not good at regex so if you can elaborate it a bit more ,that will be really helpful for me Feb 13, 2012 at 16:42
  • If you're changing the URLs, yes, if you're keeping the permalink structure the same, no. For example: if you're moving from http://oldsite.com/foo-bar/ to http://www.newsite.com/foo-bar/, you just need to do a regex remap for the base, but if you're moving to http://www.newsite.com/bar-foo/, you would need to remap individually.
    – mor7ifer
    Feb 13, 2012 at 16:44
  • @ m0r7if3r new site is duplicate of old one,everything same we are changing the domain name due to some unavoidable issues so what ever the structure of old site is will same in new one :) Feb 13, 2012 at 16:46
  • Then either method above should work beautifully.
    – mor7ifer
    Feb 13, 2012 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.