How to Change Permalinks of a WordPress Page without Losing Traffic

Today I had some fun with .htaccess and thought you would find it useful. This is what happened.

When I changed my Theme last month, I made a “Hire Me” Page. Surprisingly, Soon I found this page on the second/third page on Google for the search “Hire WordPress Designer”.


Soon my SEO brain told me, work on it and get it to the front page. That is a real deal.

To start with, I changed the permalink from hire-me to a better permalink with keywords as hire-wordpress-designer-seo.

Moving Permanently - 301 Redirect

Google takes a long time to re-index an already indexed page, at least that’s what I have seen here on Million Clues. That’s when I decided to go for a 301 Redirect.

Help came from Taming The Best, in the form of the following article:

What is a 301 redirect?

A 301 redirect is the most efficient and spider/visitor friendly strategy around for web sites that are hosted on servers running Apache (check with your hosting service if you aren’t sure).

It’s not that hard to implement and it should preserve your search engine rankings for that particular page. If you *have* to change file names or move pages around, it’s the safest option.

A 301 redirect is implemented in your .htaccess file.

Sourced from htaccess 301 redirect tutorial

So I downloaded the .htaccess file from my root directory of this domain and took a backup, if you mess-up the .htaccess, you probably mess up almost everything. And added this code:

redirect 301 /hire-me/ https://millionclues.com/hire-wordpress-designer-seo/

This is basically a 301 redirect which redirects the page to the new location and tells the search engine spider that the page has moved permanently. Using 301 means, the new location gets all the link juice the old location enjoyed.

I added this after a line of code that made it look appropriate, you should probably add it at the end of all the code in it. It works like a charm πŸ™‚

To check if your redirect is working properly, you can use this tool – Redirect Checker. Simple and Intuitive.

Hello, I am Arun Basil Lal. Thank you for reading!

I am a freelance WordPress developer with over a decade of experience. I am passionate about making things and traveling the world.

Divi WordPress Theme - My Review

Divi WordPress Theme
Divi is a WordPress theme that web designers do not want you to know. It comes with a drag-and-drop theme builder. You can build beautiful looking unique websites without touching a line of code. Just choose from one of the many pre-made layouts, or pick elements and arrange them any way you like.

Divi is every WordPress developer's wet dream. Surprise your clients with neat responsive websites and have fun building them.

Divi comes from Elegant Themes. If you enjoy building websites, you *need* an Elegant Themes membership. 87 beautiful themes and 5 plugins for the cost of less than a candy-bar each!


Note: I am an avid user of Divi myself and this is a honest review. I wouldn't recommend something that I do not personally find amazing.

24 Comments.

  1. Great Tip Arun!

    Permalinks is crucial for seo optimization, and many bloggers forget this step when creating their blogs or forget about it when they change themes like what you did. It’s so easy with a WordPress blog like mine where you can easily change it in the dashboard!

    What do you recommend for people who aren’t “programmers” Arun?

  2. SBA says:

    Very interesting. I have a mortal fear of .htaccess! πŸ™‚ I’ve used the redirect plugin — how do they differ in terms of what you wanted to accomplish?

    • The end result would be the same and from the similarity of the input boxes (on the Simple 301 Plugin), I think the plugin is also doing it via .htaccess.

      Guess what? me too have that fear. So I drank a bottle of Mountain Dew, and got it done. Dar Ke Aage Jeeth Hai. lol

  3. Simran says:

    Very useful info Arun.. New look of your blog is awesome πŸ™‚

  4. Sriraj says:

    How many such redirection rules do you have in your htaccess? I have at least 20 now πŸ™‚
    Still better is to use the built in 301 redirection capabilities of WordPress instead of pulling Apache into work. Search for ‘Urbangiraffe redirection’ and you’ll land on one of the most beautiful Wp plugins ever designed.
    Also, it’s extremely dangerous to touch the htaccess unless you exactly know what you are doing.
    While dealing with htaccess also remember that ‘Jeeth se aage Google penalty hain’, lol..

  5. Alok says:

    I have a doubt, why old URL not changed by this? I am seeing (millionclues.com/hire-me/) URL in Google.com in place of (millionclues.com/hire-wordpress-designer-seo/).

    • Alok, Thats because Google indexed that page before I changed the permalink. It takes a while for Google to re-index pages.

      The 301 redirect happens in the server, we cannot work on Google Cache, but eventually Google will change it to the new one, but it takes time.

      Hope am clear enough πŸ™‚

  6. Amal Roy says:

    Thanks bro. I was just thinking about this a while ago. This is really a help in time.
    Good Luck

  7. TechChunks says:

    Using HTTP 301 redirects to save your backlink values is a wellknown fact but I’m impressed how you have implemented it to change the permalink of a particular blog post. Kudos to you πŸ™‚

  8. Student Jobs says:

    once i change permalinks of my blog without using any redirect plugin then i lost my traffic and pagerank.

  9. Career Outlook says:

    Excellent post, I am new to wordpress and this is a very useful tutorial for me. But, Still I am afraid of doing it my own.

  10. ejewelrysource says:

    I made a really bad mistake. I lost all my traffics when changed my permalinks without using any redirections. Can I ask all of you gensises how to fix this “after the fact” problem? I do not even know how to see the previous urls to redirect. Please help!
    Thank you.

  11. Dan says:

    Hi,
    I am converting my static HTML website into a WordPress website, it is ranking extremely well on Google and I have been advised to keep page names exactly the same. I have over 150 pages so I have been advised not to use redirects.
    Becuase it is static html I have many pages ending in .htm and also many pages ending in .html as well.
    Note we are talking about pages not posts.
    I have found many plugins but they seem to add either .htm or .html to all webpages, I want to cherrypick which ones I call .htm and which ones I call .html, I have been told I need to use .htaccess for this. Can you enlighten me? I am not an expert here and I am afraid to make big mistakes.
    I also have many pages with “_”.

1 Pings / Trackbacks.

  1. My 101th post – Permalinks Migration | Photo speaks a thousand gazillion words! says:

    […] you have to redirect a specific post, you can use a 301 Permanent Redirect Click here for more info https://millionclues.com/problogging/change-permalinks-of-wordpress-pages-301-htaccess/ window.fbAsyncInit = function() { FB.init({appId: "", status: true, cookie: true, xfbml: true}); […]

Leave a Reply

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

*

Share With Friends

Email Stamp

Free Newsletter

Get my newest blog posts and insider tips. No more than a few emails a year.

Just enter your email address below and click Sign Up Now

Please enter all required fields
Correct invalid entries

You have Successfully Subscribed!