How to redirect a URL after WordPress site migration?

BIG linden / Support Docs / How to redirect a URL after WordPress site migration?



We recently migrated our website to WordPress from another platform and we’ve noticed that some of our URL structures have changed in the process. We want to do 301 redirects from all old URLs to their new equivalents.


The client has recently migrated their website to WordPress and now they require assistance about working with 301 redirects for URLs whose structures have been affected and/or modified during the migration.

How to redirect a URL after WordPress site migration?

Website migration can be a complex process and it often results in changes to your website’s URL structure. If you don’t update these URLs, users clicking on your old links might experience 404 error pages — which isn’t ideal for user experience or SEO purposes.

After migrating your WordPress website, it’s crucial that all traffic pointing toward your old domain gets redirected to your new one seamlessly. This can be achieved using several methods.

Thankfully, implementing a 301 redirect (a permanent redirect) in WordPress after migrating your website is straightforward.

There are two main approaches that you can use to implement 301 redirects in WordPress- .htaccess file (for Apache servers) or using a plugin like Redirection.

Using .htaccess file

  1. Locate the .htaccess file within the root directory of where all your other core PHP files reside.
  2. Make a backup of this file before editing.
  3. Open up .htaccess on any text editor.
  4. To add a single 301 redirect, add the following at the bottom of your .htaccess file:

Redirect 301 /old-page.html https://www.domain-name.com/new-page/

Here, the “/old-page.html” is the relative path of the old page URL (just append whatever comes after your main domain name). The “https://www.domain-name.com/new-page/” is your new URL where you’ll be sending people when they type or click on original URL.

If you are changing domains entirely or need to create many 301 redirects at once, a regex expression would be helpful:

RewriteEngine On
RewriteRule ^(.*)$ https://www.new-website.com/$1 [R=301,L]

This wildcard redirect maps old URLs to their corresponding new location in a matching fashion.

301 Redirects Using a WordPress Redirect Plugin

If using the .htaccess file seems too technical, there are straightforward plugins available that you can use.

The ‘Redirection’ plugin is one of the most popular choices. This is quite simple to use:

  • Install and activate the plugin.
  • In your WP dashboard, go to Tools -> Redirection.
  • Type your source URL (your old/ outdated URL) and Target URL (The new URL where you want your users to reach).
  • Click on ‘Add Redirect.’

Check after implementation that your 301 redirects are working by clicking or visiting the pages where old URLs were originally linked. Both methods will start redirecting your visitors and search engine crawlers once implemented properly.

It’s always recommended, especially after such significant changes, to crawl your website afterwards to ensure all pages are loading correctly and no error codes (like 404) are being returned.

More importantly, do click throughs manually, visit several directions and see how they fare for speed compared with other homepage loads. Be sure errors can be quickly fixed during manual perusing when clicking on links.

Website migration is like moving a fully-equipped house; it’s a process that involves shifting all your data from the old site to the new one without loss or damage. In such a situation, one often overlooked yet highly critical concern is managing URL redirects.

Additional reading

If you’re looking for more detailed information specifically about WordPress website migration or setting up 301 redirects please have a look at these helpful resources:

More articles about WordPress

More articles related to .

Capabilities related to WordPress:

Prevent attacks, regain control of your WordPress website with Enterprise security solutions.
Move your website from Wix to WordPress and get the website you need.


Get a 30 minute 1:1 consult with a BIG consultant and get a 7 page report on making digital work in your organization with key insight into paths for success and playbooks just for your unique needs.

Please understand not all requests can be met. Please contact us with any questions.