Help with redirects on domain name change


I’m having a bit of trouble figuring out the best way to implement a domain name change on a wordpress site that also includes moving some of my content to an entirely new domain.

For example sake, I have a site “olddomain”, I have existing backlinks to many different articles on this site. I need to do two things, change the domain name of the site as well as move some of the content to a completely new site. How would one setup redirects properly. I also am unclear if I need to do a find and replace with the new domain name.

I am unclear on how to prioritize the redirects on pages that are moving to the entirely new domain. For starters, I want to change domain names from “oldDOMAIN” to “newDOMAIN”, additionally I will be moving some pages to a brand new site. page “oldDOMAIN/spreadsheets” to “newWEBSITE//spreadsheets”.

Any guidance is appreciated…


Beforehand, take notes on all page urls you want to redirect.

The solution here requires an update of your database to change to This change is
ONLY thee main domain. NOT the pages. Id suggest not doing it if you have not done it before. Maybe there is plugins to help, but I dont know of them. A mess up here will completely destroy the site and will require a pro to fix.

Then you need to apply all your redirects via either a plugin or htaccess.

Its rather simple really, but even the slightest mess up will be very hard for you rto fix. Id recommend hiring someone. There are 421,000 results in google on how to do this. Here is one:


You’ve got two stages to the changeover, tip.

First is to change the domain name in WordPress itself. You’ll do that by changing it in the Settings > General dashboard page Then you’ll use the Better Search Replace plugin to update the database to the new domain as well.

After that, you’ll need to create a rewrite rule for your site’s htaccess file that will automatically redirect all the old URLs to the new equivalent URLs.

Last, you’ll want to create individual redirects for the several pages you want to redirect to the completely different site. You’ll enter those URLs at the top of the htaccess file above the general rewrite rule for the old domain name. You’ll want to include the “L” flag in that rule as extra insurance. (It means last - to indicate no more rules in the htaccess should be processed)

Because the htaccess file is order-dependent (hierarchical), as long as you have the redirects to the separate site located above the general domain name rewrite rule, they’ll get processed first and won’t’ be affected by the domain name rewrite.

Hope that all makes sense?