301 redirects in WordPress – Complete How to Guide

301 redirects WordPress guide

It’s strongly recommended to set up 301 redirects in WordPress when you change the URL (permalinks) of your posts and pages or move your website from one domain to another.

If you are changing the URL / domain of your WordPress website, you need to plan carefully so that you don’t lose any of your existing traffic and SEO elements for existing post/pages for your old domain.

Adding a 301 redirect to your posts and pages is really easy in WordPress.

I will introduce you to few ways you can easily add a 301 redirect to your posts and pages or the entire domain of your WordPress blog/website. Besides, I will help you implement these redirections while retaining your existing traffic and SEO.

Let’s start by learning what a 301 redirect is, when and why you should add 301 redirects.

Feel free to skip directly to the Section of different ways if you already know about 301 redirects.

What is a 301 Redirect?

A 301 Redirect is one of the redirection ways that indicates the page has permanently moved to a new location.

With regards to SEO, there are three main kinds of redirection that we can use to redirect one URL to another.

  • 301, “Moved Permanently”
  • 302, “Moved Temporarily”
  • Meta Refresh

A 301 redirect indicates that the URL has “Moved Permanently” and passes more than 90% of search engine link juice to the new URL.

If you are not moving to the new URL permanently, you might consider using 302 redirect or other redirects depending on your situation.

We will dig further into permanent 301 redirects in this tutorial, but you can research other types of redirection on your own.

When should you add 301 Redirects?

You need to understand when you should be using 301 redirects. Let’s look into few cases where 301 redirects might be helpful.

  • You change the directory of your WordPress installation.
  • You have moved your website to a New domain, and you want the old URLs from a previous website to point to new URL.
  • You change the Permalinks (URL structure) of your posts and want to redirect people visiting old pages to right pages.
  • You want to maintain a preferred (canonical) destination for your homepage. (Redirecting www version to non-www version of your homepage).

In all above cases, we want the 301 response status code as we have changed the URL forever.

Why add 301 Redirects?

So now that you know when to add 301 redirects, I want to point out few important reasons why you need to choose explicitly 301 redirections.

Your Visitors User Experience

You don’t want your website visitors to land on a page with 404 error because you have changed your URL. Other websites might have linked you with your old permalink, and you want to help your readers by directing them to the right page if you have changed your URL.

Search Engines – SEO Reasons

Your old URL is already indexed by several search engines, and you want to retain the link juice (ranking influence) of those search engine indexed pages when you change the URL.

Adding 301 redirects is the best practice that search engines take into consideration to understand that the page has moved to a new URL. Search engines thus record the change and pass the ranking and trust to a new URL.

Of course, this will take some time for search engines to crawl and make the changes. Further, search engines will also take in several considerations of the new domain if you are entirely changing the domain name itself.

301 redirect WordPress

Adding a 301 redirect in WordPress is really easy. Depending on whether you are changing permalinks or the entire domain URL, here are few methods that you can use in WordPress.

301 Redirect – Top 5 WordPress Plugins

Plugins make a lot of things easier in WordPress, and unsurprisingly there are few popular WordPress plugins that make adding 301 redirects really easy.

1. Redirection WordPress plugin

Redirection is the plugin that I use and strongly recommend for 301 redirections. It is also one of the most popular plugins available in the official WordPress repository.

Redirection WordPress Plugin for 301 Redirects
Add New Redirection WordPress Plugin
  • Define the Source URL (your old, existing URL) and the Target URL (your new URL that you want to redirect to) and click on Add Redirection.
  • A 301 redirection type is added by default! And that’s all that you need to do

The redirection plugin is a powerful plugin and has several other options.

One of the most useful features (also why I recommend using this plugin) is that it automatically adds a 301 redirection when you change your post URL in WordPress at any time.

Other features such as 404 error monitoring and custom redirection methods (301, 302, and 307 redirects) can be useful for wider SEO purposes.

The plugin is also available in more than 25 languages.

Download Redirection Plugin

2. Simple 301 Redirects Plugin

This is another WordPress plugin that lets you simply add 301 redirects. Simple 301 Redirects is also one of the most used plugins on WordPress.

Simple 301 Redirects WordPress Plugin
  • Download and install the plugin from WordPress repository.
  • Once activated, go to Settings > 301 Redirects page.
  • You will see two clear boxes to add your OLD URL in Request box and new URL in the Destination box.
  • Click Save Changes and it automatically adds a 301 redirection type.

You can also use Wildcards with this redirects plugin. To use Wildcards, check the “Use Wildcards” checkbox just below the URLS boxes.

You should also put an asterisk (*) after the folder name that you want to redirect. See the image and example below.

Simple 301 Redirects WordPress Plugin Settings

Request: /old-folder/*
Destination: /redirect-everything-here/

Download Simple 301 Plugin 

3. Quick Page/Post Redirect Plugin

Quick Page/Post Redirect Plugin helps you to quickly add different types of redirects (301, 302, 307, meta) to your WordPress pages and posts.

Quick Page Post redirect plugin
  • Download, install and activate the Quick Page/Post Redirect Plugin from WordPress repository.
  • You can add redirects using two ways – “Quick Redirects” and “Individual Redirects”.
  • To add Quick Redirects, go to Quick Redirects menu that you will see after activating the plugin.
Quick 301 Redirects WordPress Settings
  • Enter the Request URL and the Destination URL and the plugin will automatically add 301 redirects by default.
  • You can delete existing redirects by clicking on the trash icon at the end of the row and edit a redirect by clicking on the pencil edit icon.
  • Individual redirects are useful for redirecting menu items, duplicate posts, or redirecting any existing pages to a different URL.
  • You will see a meta box below your visual editor where you can add a Redirect / Destination URL. Choose the 301 redirect from the option (see image below).
Metabox in visual editor WordPress to add 301 Redirects

One final useful option I want to point out in this plugin is the ability to add ‘rel=”nofollow“‘ to the link if you don’t wish to pass the search engine rank juice to the redirect URL.

Download Quick Page/Post Redirect Plugin

4. Safe Redirect Manager – WordPress Multisites

If you are a developer or use WordPress Multisite, I recommend using the Safe Redirect Manager plugin.

Safe Redirects WordPress plugin

This plugin comes from trustworthy developers at premium WordPress agency- 10up and helps you to manage safely your website's HTTP redirects.

  • Download and Install the Safe Redirect Manager plugin from the WordPress repository or zip via Github.
  • Once activated, go to Tools > Safe Redirect Manager.
  • Click on Create Redirect Rule on top of the page.
Safe Redirect Manager WordPress rule
  • Under redirect settings, fill in the Redirect From: and Redirect To: URLs.
  • Under the HTTP Status Code, you will need to select the “301 Moved Permanently” manually.
Safe Redirect Manager Different Redirections
  • Hit publish or schedule when you are done.

Unlike other plugins, you can also schedule redirects for later dates just like scheduled posts with the Safe Redirect Manager.

Although you will only need 301, permanently moved (or sometimes 302, temporarily moved), this plugin gives you several advanced options to add different HTTP Status codes.

Actions in filters make this plugin very extensible and you can find more development options and guide on Github repository.

Besides, the plugin is available in multiple languages including French, and Slovak.

Download Safe Redirect Manager plugin

5. Yoast SEO plugin – htaccess tool

One final plugin that I want to mention here is the Yoast SEO plugin that is used by many of us. Yoast SEO plugin doesn’t need any introduction, but you might not have realized that the plugin also has some features that can help you with 301 redirects.

Yoast SEO Plugin WordPress Redirects

Why install more plugins when you can do it with the plugins that you have already? We all want to keep the plugins to a minimum, right?

The Yoast SEO plugin lets you edit your .htaccess file (more on that later) which you can use to add 301 redirects.

Now, I don’t recommend using this if you aren’t comfortable editing .htaccess file. Follow the steps below if you have already installed the Yoast SEO plugin and are comfortable editing the .htaccess file.

  • From your WordPress dashboard, go to SEO > Tools and you should see a list of built-in tools for WordPress (see Image below).
Yoast SEO Tools within Plugin
  • Click on the File editor tool that lets you edit your .htaccess file.
  • Important: Backup your .htaccess file before you make any edits. (In case you mess up your .htaccess file here, you won’t be able to access your WordPress dashboard. You will need to login to your FTP client and correct the syntax or restore the .htaccess file that you have backed up.
  • You will see two boxes for Robots.txt file and .htaccess file on this page.
  • Add your redirection code (see a sample code in the screenshot for 301 redirections or see the code that you need in the next section) in the .htaccess file box and click on save changes to .htaccess.
Yoast SEO htacess tool code 301 redirection

You can also edit your .htaccess file manually to add different kinds of redirection codes, and that’s what we are going to discuss next.

If you have successfully added 301 redirects using plugins, skip to the few other sections in this tutorial to optimise your SEO.

301 Redirects with .htaccess File

You can easily add 301 redirects for a few WordPress posts and pages by using a plugin but what do you do if you are moving your complete website to another domain?

If you are a pro user or depending on your situation, you might need to edit your .htaccess file to add 301 redirects manually.

You will need to have FTP access (username and password) and login to your server using an FTP client such as Cyberduck or FileZilla.

Once, logged in you should see a .htaccess file in the root of your WordPress installation that should have some information in it already.

Here’s what my content of .htaccess looks.

This is the code that WordPress adds during installation or when you change the permalink settings.

It’s possible that you might also have some additional code added by some plugins.

And in some cases, you might not have the file at all. Try adding one yourself using the FTP editor. Remember the . at the beginning of the filename (.htaccess). Also, set the permission to 644 as required and recommended for the .htaccess files by WordPress.

301 Redirect Codes

Depending on different situations (whether you are changing just the URL or changing the complete domain), you will need to add different redirection codes in the above .htaccess file.

To remind you again, please back up this file before you make any edits.

Let’s explore some of the situations and codes that you need to add 301 redirections to your .htaccess file.

Redirect Posts/Pages on same domain

Let’s say you have simply changed the permalink (URL) of posts or pages on the same domain. Your previous URL, for example, was /old-post/ and you changed it to /new-post/.

Here’s the code that you will need to add to your .htaccess file.

The second line of the code above is where the magic happens.

You need to specify the redirect type with Redirect 301 keyword and add your old URL first (/old-post/) and then add the new URL (http://www.yourwebsite.com/new-post/) that you want it to be redirected to. Remember to change the link yourwebsite.com to your own domain name.

If you want to add more redirects, just add below line 2 in the same format. Line 1 and line 3 are simply comments.

Redirect old domain to a new domain

If you are moving your WordPress website to a new domain – For example, your previous domain was olddomain.com, and now you have moved to newdomain.com;

If you want all URLs from the previous domain to point to the new domain, You will need to edit the .htaccess file of your Old domain.

Here’s the code that you will need to add to the .htaccess file of the old domain.

Obviously, you will need to change the olddomain and newdomain to your own domain names. Also, change the .com extension, if required.

This code also ensures that your posts and pages are redirected to the corresponding post/page on the new domain.

For example, here's a real .htaccess code that I used to 301 redirect my personal website Pradeep.co to the .com version of Pradeep Singh.

If your websites are on HTTPS, please don't remove the other code from the .htaccess file required for SSL. And remember to add https to the new domain as in the above example.

301 Redirects after Moving to HTTPS / Adding SSL

If you have recently moved from HTTP to HTTPS or added SSL to your website, you will need to 301 redirect all your HTTP traffic to HTTPS.


Add the following 301 redirection code to your .htaccess file and your visitors will be automatically redirected to the HTTPS version of your website.

You might already have the line 1 – RewriteEngine On if you have an existing .htaccess file. Just make sure the line 2 and 3 of the above code follow your existing RewriteEngine On line.


Add the following code to your Nginx config.

You can also use WordPress plugins like Really Simple SSL that redirects all incoming requests on your website to the HTTPS version.

 SEO after 301 Redirects

Now that you have added 301 redirects either manually or using the plugins, you are all good to keep the SEO rank juice flowing to the new URL.

If you only redirected a few posts and pages on the same domain, there’s nothing much you need to do. Your new URLs will be soon seen on the search engine results page (SERP).

However, if you added 301 redirects after moving to an entirely new domain, there’s one more step that I would recommend for SEO purposes.

Domain Change in Google Webmasters Search Console

Although Google is smart enough to pick up the changes itself, you can make its job easier by notifying yourself and speeding up the process.

If you are concerned about SEO, I assume you already use the Google Webmasters’ tool – Search Console. (If not, sign in with your Gmail address and add/verify your sites).

You need to have both of your domains (the domain before 301 redirections and the new domain) verified in the search console. Click on “Add a Property” if you need to add and verify the new website.

Steps to Submit Change of Domain

  • When logged into Search Console, click on the old domain that you want to move away from.
  • From the dashboard, click on the Gear Icon (towards the right corner) and then click the “Change of Address”.
Change of Address Google Webmasters Tool
  •  You will need to follow the four steps and pass through each of them to finally submit the changes.
Change of Address Google Webmasters Search Console
  • Select the new website from the list in the first step.
  • You can now confirm if the 301 redirects that you added (using codes above) are working properly in the second step.
  • You will need to have both the domains verified even after the 301 redirects.
  • Click on Submit and you have successfully notified Google of the change.

Note for Step 2: You might not pass the step 2 immediately after adding the htaccess redirection code, but try it again after a day or so and you should be able to confirm all the steps.

Change of Address 301 Redirects Pradeep Singh

It will take few days for you to see the changes in SERP. Be patient and keep monitoring your index status and traffic for a new domain within the search console.

How long should the 301 Redirects be Active for?

This is one of the common questions after someone goes through the redirection process. It depends on several factors such as the traffic that you receive for old links and the number of incoming links from other websites to your old domain posts.

Although there's no official timeline, many SEO experts recommend keeping the 301 redirects active for at least a year. Google could take from 6 months to a year to fully recognise that the site has moved. Google’s John Mueller in a hangout session has also suggested (watch at 26:18 mark) aiming to keep the links active for at least a year.

Finally, for those who keep on changing domains and have multiple 301 redirects, here’s a video from Matt Cutts of Google that I recommend watching for best practices.

Summing it Up

To sum up, 301 redirects are really essential and the right thing to do from both users’ and search engine perspectives. You don't want to lose the existing traffic and SEO rankings that you have built over time. And at the same time, you want to help your visitors by pointing them to the right URL or domain.

I hope you are now able to add simple 301 redirects while maintaining all your traffic and SEO aspects.

Subscribe to this blog if you found this tutorial helpful and as always, leave a comment below if you need help with anything.

  • August 2016 Update: Google has made some official announcements for new rules of 301, 302 redirects. Follow our latest post about 301 redirects and effect on PageRank to know more about the recent developments.

301 Redirect WordPress Plugins Review

Several highly rated 301 redirect WordPress plugins make it really easy to add 301 redirects. You can also add the code manually for htaccess 301 redirects.

Pradeep Singh

Pradeep Singh

Pradeep Singh is the founder and your host here at WPism. He is an entrepreneur and blogger living his startup life based in London and Cambridge. Follow him on Twitter or like his page on Facebook.
Share on facebook
Share on twitter
Share on reddit
Share on linkedin
Share on email

71 Responses

  1. Thanks, For a great guide!
    I have managed to redirect my old pages with a horrible permalink structure to new duplicate pages with mydomainname/post-name. Using the simple 301 redirects plugin.
    I did this after struggling to change my permalink structure in settings.
    It appears this has worked fine and the desired urls are displaying.
    My Question is however, Can I now delete/trash my old pages? As they are just duplicates of the new pages. Any advice would be great. Thanks again.

    1. Hi Michael,
      Glad that you found it useful!

      – Changing Permalinks under settings is easy and you should have tried doing that instead of creating duplicated posts.
      Also, you could have changed the permalinks of each individual page by just clicking on the EDIT button next to permalink under the page title.

      But as you have done the hard work already and as all the content is on the same domain, you can delete the existing pages. Please make sure the redirection is in place and everything is working fine.

      I hope it helps!

  2. I am running multi site setup and this is not working for me.

    I have 123.mydomail.com as a site. I bought new site and want to redirect all visitors at 123.mydomain.com to 123.com but don’t want to redirect users at mydomain.com

    Thanks for help

  3. I just changed my permalinks and not sure how to redirect the old permalinks to the new ones. Do any of the suggested plugins do this automatically?? I don’t want to paste in every single page URL to redirect my pages manually.

  4. Hi Pardeep Sir,
    Very nice and helpful article on wordpress redirects. i want some bit more help about redirection.
    I have a blog for wrestling and now i want that what a user click on download link or view online link inside the post,
    wordpress redirects to a custom html page, which designed for only displaying iframe video box to view online and some ads.
    what should i do?

    1. Hi Ali,
      Is that not as simple as linking to another post? Where do you need the redirection?
      And if you need redirection for the post in another domain, you can create redirects manually for each url pointing to the post by using plugins such as Redirection. (Install the plugin, go to Tools > Redirection and setup for each url to point to post on a new domain).

  5. Hi Pradeep,

    Great article!

    I have a question.

    1) I am moving all my content from a year old site to a new domain and the articles will now be on the new site but living under 2 new categories: Example:





    Using the Yoast SEO tool you mentioned, can I use a 301 redirect where I can redirect all the articles within a folder (i.e. “chocolate”) on my old site to then live under the new folders (i.e. “food/desserts”) on the new site?

    Would it be:

    # BEGIN 301 Redirects

    Redirect 301 /chocolate/* http://www.domain2.com/category/food/desserts

    #END 301 Redirects

    ..or do i need to redirect one unique URL string to the new unique URL string on the new site?

    2) Ultimately, I want to dispose of hosted site 1 above but if i’m understanding correctly, I need to have that first domain and hosted site up in order for the redirect to work? Is that correct? (Perhaps after a couple of years, I can dispose of that first site?)

    3) That said, will having the same content on domain 1/hosted site 1 AND now domain 2/hosted site 2 effect my SEO?

    thank you,

    1. Hi Matt,

      1. I guess it should work as far as I understand but try and see to make it sure.

      2. Yes, you will need to keep the previous site active. Use the Google search console to notify google of change of your website address.

      You need to have both of your domains (the domain before 301 redirections and the new domain) verified in the search console. See the complete instructions above.

      Ideally, you should keep it as long as possible but depending on your situation (such as the traffic you are getting to those previous domain links, other websites still linking to your old domain); you might want to decide accordingly.

      Google’s John Mueller in an hangout session suggested to keep it for at least a year.

      3. The entire point of using 301 redirection is to preserve your SEO efforts. As long as you have redirected all the links properly, this shouldn’t be a problem.

  6. Hi, Pradeep, nice article, i’m also battling one scenario of my own, recently i have launched a wordpress multi site for one of client, after launch client change his mind to use the full domain name with “www”, so i have change .htaccess file to force the url to use the www, once the it’s active my site goes down, what i except was ” data base connection error” since i have update the url on the data base, what i’m getting is ” cannot find server error”. can you help me figure it out what’s wrong in my code, below is the .htaccess i’m using

    RewriteEngine on
    RewriteBase /

    RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
    RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

    RewriteRule ^index\.php$ – [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

  7. Hello
    thanks for great post
    i want to change the permalink structure to my website
    from /%category%/%post_id%
    to /%post_id%/%postname%/

    and want to redirect all my old posts (1287 post) indexed in google search to the new structure “301” redirect i tried but failed

  8. Great – this enabled me, finally, to organise the 301 redirects for our website. Thanks a lot, very clear.

  9. # BEGIN WordPress

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^pradeep\.co$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.pradeep\.co$
    RewriteRule (.*)$ https://pradeepsingh.com/$1 [R=301,L]

    # END WordPress

    why use ^pradeep\.co$ [OR] instead of ^pradeep.com$ [OR], what is the meaning of “\” and the “co$”, thank!

  10. Finally. An article on 301 redirects that doesn’t give me a nosebleed. Thank you. I had a lot of confusion on this earlier because I was reading articles that were not clear on what type of plugin and where to install the plugins for different circumstances. To be clear — I am switching from blogger to wordpress, using the same domain, but with slightly different permalinks (No more html in the end). So I will need any of the plugins you mentioned in 1-3. I have a question. What’s stopping people from redirecting popular urls and permalinks to their own sites using these plugins?

    Thank you so much!

    1. Hi Ina, Glad that the article is helpful to you.
      These plugins work only the sites that you install and the URLs that you can use for redirection “Redirect From URL” should be your website URL that you have installed the plugin on. Of course, you can choose to “Redirect To” any other websites URL.

    2. I had trouble with Simple 301 redirect, problems with and without the ‘/’ at the end of my URL’s or something? Then it caused issues with my security certificate so I went looking for an alternative.

      Anyway this was before I realised there was a WordPress one ‘Redirection WordPress Plugin’ as you have mentioned in your article. I found this much easier to use once I realised I could just keep an eye on the 404’s by clicking the tab then when I saw one that I’d miss it’s very easy to just click ‘add redirect’ then choose the page on your site that it needs to go to (including your domain name and the http or https – Full URL of your page that you want it to go to. You can keep an eye on how many hits each redirect is getting as well. Much easier!

      And here I was copying and pasting them all from Notepad into the ‘Simple 301’ and not even sure if I needed some of them. Now I can keep an eye on the 404’s AND the redirects then eventually remove the old ones when they aren’t getting hits anymore. Is that the best way to do it? Or should I just leave them in – I have some 13 year old URL’s! Maybe it will be good for SEO if I picked up these really old ones as well? Or should I just let them go now that they are so old? I still have a relevant page I could direct them to, same content just a new url.
      I’m still a bit confused about the best way to do it and how long to leave them in place. And if URL age has any effect on SEO even if it has hardly any traffic on it these days. I guess it can’t hurt to try, I will report back if I learn anything more.

      1. Hi Andrew,
        Glad that you found a plugin that works for you.

        There’s no harm in leaving them in the redirections if you have time but again like you said, you can track to see if those links are still getting traffic and leading to 404 errors. If those old URLs are in your control and linked from within your site, you should rather invest time in changing those.

        You can always wait to see if those links get traffic from external websites and keep tracking your 404 errors and redirect accordingly.

  11. Hello sir

    How to redirect link example like bellow:





    Many my articel found in google search engine in doc or pdf and i want user can’t download in google search but after found my articel in google user redirect ( entry to web ) page articel.

    How to write code redirect in htaccess? thanks you .

  12. Hello there,
    I used .httacces method to redirect about 50 old urls on .httaccess.
    There are ugly urls generated by, I don’t know, maybe by plugins, for example https://www.example.com/{true_url}/2147483647 or 9223372036854775807
    and there are some urls from deleted posts.

    In your opinion, this is okay we have .htaccess with some redirects ? My .htaccess file almost 25kB

  13. Thanks for the guide. I recently changed my domain, I did every thing right (in my best judgment), I also notified Google search of the change via webmasters tool, but for some days now, search traffic has been dropping.
    Do you have any suggestion as what I should do, or should I just wait? It is not up to 2 weeks since the change.

  14. Thanks for sharing this – I have tried option 1 and 2 but no luck 🙁 I had or rather have a wordpress.com blog – it’s still active, but this weekend I registered a new domain (.com) via Siteground. I really don’t know how to redirect to my new domain as both options mentioned have not worked for me. Do you perhpas have another suggestion?

    Thank you

    1. Hi Nicola,
      All these suggestions are for self-hosted WordPress websites. WordPress.com operates slightly differently and there are limitations in terms of what you can install.

    1. I wouldn’t recommend doing that. You should monitor all your 404 errors and do 301 redirect to appropriate pages.
      Use the Redirection plugin mentioned in the article above, instead.

  15. I recently changed by site to SSL. Should I use 301 redirect for http to https?
    What about the remainder of my site…I have about 300 pages. Will this one change take care of my whole site?

  16. Wow! Super helpful guide! Answered a lot of questions I was curious about. Keep up the good work!

  17. Great Guide.

    I’m currently in the process of transferring one WordPress Sute on a HTTP domain to a new WordPress site on a different HTTPS domain.

    So would I need to set up the Redirection plugin on the old site & point the 301 to an address on the new site?


  18. Great article
    Doing 301 redirect on WordPress when necessary is very good for seo, i use yoast premium plugin for my 301 redirects

  19. Hi
    Thanks for this helpful article. I have recently migrated from a WordPress.com site to a self-hosted WordPress.org site, and wanted to use the Simple 301 (plugin no.2 in your article) redirect to point old subscribers and readers of my old site to the corresponding posts on my new one. However, after adding redirects for all my posts (about 40), when I check my old site there is no redirection to my new site. What am I doing wrong?

  20. Thanks. but how can i redirect my permalink structure from /%year%/%monthnum%/%postname%.html to just %postname%.html using .htaccess

  21. Thank you for the helpful 301 redirect guide, Pradeep. I have a specific question I’m hoping you can help with. I just moved my wordpress site to HTTPS using the Really Simple SSL wordpress plugin because that’s what the guy on the phone at GoDaddy suggested. The site is doing fine, page rankings seem the same, but now I’ve decided I want to change my permalink structure before I add any more blog posts. I want to do 301 redirects for the posts i have so far but I’m worried it’s going to mess with the SSL plugin. Is there anything I need to watch out for or any best practices? Should I just manually add the redirects for the 16 blog posts I have in the .htaaccess?

    1. Thank you for your comment, Rebecca – really glad that it was helpful to you. If you have only 16 blog posts, I would recommend adding the redirections manually.

      Use the Redirection plugin mentioned above and add the redirects to 16 blog posts.

  22. Thank you, this is great.

    Do you by any chance know what the code for the htaccess file is to exempt the facebook crawler from the redirections? I have old blog posts from before migration that I want to use the social share counters for, so Facebook needs to not redirect to the new page (I added an go:url tag to the meta tags for the new URL that points facebook to the old URL but now need to prevent redirection for the FB crawler or else it can’t access the old urL). Here is what I THINK but I’m not sure if it’s correct:

    My old htaccess file:

    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    and now with the new line:

    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{HTTP_USER_AGENT} !facebookexternalhit/1.1
    RewriteRule . /index.php [L]

    # END WordPress


  23. Thanks for the article.

    Just a quick question: If I create a redirect with the Redirection plugin will it still work if I delete the plugin afterwards?

  24. Thanks, sir for the great info. I’m using Safe Redirect Manager Plugin for redirecting my removed post URLs to the new one. But, how to redirect http to https?

  25. Thanks a ton for this super helpful guide! Happy that I stumbled upon it and saved my site from a potential disaster! 🙂 Quick query, if you are still listening in on this post.

    I prefer the Redirection plugin, primarily because it supports automatic redirection. So, does ‘automatic’ here mean that after I install and activate the plugin, I simply have to navigate to WordPress -> Setting -> Permalinks to change the structure of the site’s posts. And that’s it – the Redirection plugin will detect this change and take care of everything after. Or do I need to do anything else?

    Once again, thank you for the helpful post!

    1. No, you will still have to manually add redirection for all the posts if you’re not using any redirect rules in .htaccess file (assuming you want to change the entire permalink structure of your site).

      1. Thank you so much.

        I chose to, instead, edit the htaccess file with a single Redirectmatch rule followed by a changing the permalink structure. It was fast and convenient and switched over nicely.

        Kind regards,

  26. Thanks Pradeep for a very helpful and through guide. I was very frustrated with all the others. They beat around the bush and was of little or no help. Yours is through, helpful and practical. Thanks again. Keep up the great job.

  27. hello I read everything and applied but didn’t work please help me out
    301 permanent Redirects Not Working old domain to new domain ..
    my website running on godaddy hosting. I changed website address old domain to new domain but when i click on old domain its not redirecting to new domain…Why?

    When I search on google for my old website then its showing result when i click on any post then showing This Site can’t be reached… Plz help me

  28. It’s really helpful for me. I have been using Redirection WordPress plugin for 7 days, it works perfectly. Thank you.

  29. You’ve recently updated this article, but I’m curious whether you are still using either of your first two choices. I have previously used Simple 301 redirects, but on a new site, I can’t get it to do anything at all. So I tried your first choice, and I’m running into the same problem.

  30. Nice article was able to add a 301 redirect to domain afrojac10.ooo >>> afrojac10.com. And also changed my site url in search console.
    But I faced some challenges here’s what happened.
    When I was changing Address URL in Google search console I was unable to confirm the old URL is my property so I had to verify it again. I tried uploading the Google file to host (root of domain) for verification still did not work.
    But here’s I did it
    1. Go the the new search console
    2. Add the property again using domain verification.
    3. Google will give you a text file ,copy the file and add it to DNS in your domain then go back and verify.
    4. If you’re using a domain that does not have DNS and you use Cloudflare simply copy the text and do this.
    5. Go to Cloudflare dashboard and add a new record (under DNS section) use TXT: “common name” should be your domain name then paste what you copied from Google and save.
    6. Go back to Google and verify, that’s all you are good to go now.

  31. Very helpful! I was afraid this would be too much for me as I am NOT tech-savvy. The WP plugin made my 301 redirect a breeze.

  32. Hello! Using the WP redirection plug in: does my old website/URL need to be active in order for it to work? My old URL is gone. But I’m trying to get my pins to redirect to my new website and it’s not working with the redirection plug in

    1. Hi Kristin,
      The redirection plugin should remain active on the old website – the website whose URLs you want to redirect.

  33. Hi,
    My previous website was in WordPress now I have shifted it to HTML can you please tell me how to redirect old URLs to new website.

    1. If your website URL is the same, but the page names have changed, you could use your .htaccess file to do the redirection. You could use rules and redirect all files in the same way, or you could do specific files. Without knowing specifics of what you want to do, I’d suggest you google using .htaccess to redirect files and I think you will find what you want.

Leave a Reply

Your email address will not be published. Required fields are marked *

Join our list

Our Exclusive Deals

See our curated list of latest WordPress deals and discounts.
Top WordPress Deals

Share this post

Share on facebook
Share on twitter
Share on pinterest
Share on linkedin
Help us share this post with your network?
Share on facebook
Share on twitter
Share on linkedin
Share on email
Want to keep updated with WordPress?

Join our monthly newsletter to receive best curated WordPress resources.