HomeTipsChange Permalink With 301 Redirects - Wordpress Guide

Change Permalink With 301 Redirects – WordPress Guide

This blog has been live for well over 4 years now and during this time I have had change permalinks a number of times. From the default “/?p=123” to “/%postname%.html”, I never really bothered about SEO effect or pages returning 404 error or users complaining. This was true when there wasn’t much of traffic and neither was there an element of seriousness about blogging.

However, 4 years later, a lot has changed, more traffic, a large user base and acceptable search engine rankings. Now that I have learned that “/%postname%/” is what I should have opted for, I was searching for an easy to change permalinks. Yoast has a great article about doing the same but for me, the steps listed there didn’t work, even though the articles were being redirected properly but the homepage was returning 404 error. Damn, I said, and continued to find the best way out.

I am listing down the steps I followed to change wordpress permalink structure and in the way handling 301 redirects as well:

  1. Install Redirection Plugin from wordpress repository.
  2. Activate the plugin.
  3. Under Tools -> Redirection, you’ll get access to Redirection settings, open it.
  4. Enter the following values:
    1. Source URL – “^/([^/]+).html$”
    2. Target URL – “$1”
    3. Check the “Regular expression” option (since we are using one!)
  5. Now simply click on “Add Redirection” button and we are ready to make the transformation.


This was about preparing Redirection Plugin to handle 301 redirects. Now we need to make the permalink change in wordpress installation. In case you are not aware of the steps, continue reading:

  1. Go to Settings -> Permalinks
  2. Choose “Post Name” radio box under “Common Settings”
  3. Click on “Save Changes”.

That’s it! You are now good to go. Flush the cache before testing the working of all links. With this you’ll not be losing the link value of existing URL’s; traffic from search engines or getting 404 error pages.


Please enter your comment!
Please enter your name here

Recent Articles