In continuation of my previously asked question preserve-search-engine-index-while-shifting-to-new-domain. The migration is being done in the word-press and we will have same server with same IP.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 in wordpress 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.

We are planning to shutdown the Old domain in next 6-7months once the new domain is UP.Is that a good decision? Additionally one more doubt which is there in my mind is about duplicate contents since both the old domain and new domain have 100% similar contents, so there might be some penalty from search engines.How can we handle that?

1 Answer 1


WordPress knows what stuff belongs to it in the .htaccess file. You'll see BEGIN/END comments if you look. Just put any custom stuff outside that block and you'll be fine.

Do we need to create a mapping for each old URL to new URL?

This is unlikely, but really depends upon whether the changes from old to new URLs can be condensed into a pattern you can match with regular expressions. Sometimes you'll end up with a few special cases that do need one-off rules, though.

I would actually suggest looking at the Redirection plugin(extended docs).
For starters, it'll manage the rules for you from within WordPress, rather than you having to edit the .htaccess file directly. After activating, it can keep a log of failed incoming URLs, so you know what you have to set up redirects for. (You seem to already know this, but you still could've missed something.) Once you know that, it can actually generate many rules for you via a wizard-like interface. If your needs are complicated, you might still have to create some manually, but it can take care of a good number of common situations.

  • Thanks!! that's seems a good point for me as i was scared for such a huge manual work :) Commented Feb 13, 2012 at 13:07

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.