How to Change the Permalinks or Delete Pages on a WordPress Website Without Losing Traffic or Driving Visitors Crazy

Traffic

photo credit: Daniele Pesaresi via cc

If your website or blog is getting traffic, changing the permalinks will result in an immediate drop in traffic to your site, and more importantly, your popular pages, unless you do something to stop it happening.

It’s a scary thought, isn’t it?

Think about it – Google knows the URLs of all your pages, then, one day, you change all or one of the permalinks without telling Google (or the other search engines) what you’ve done.

The traffic will keep hitting the old URL(s), where your visitors get a 404 error (page not found – you’ve seen one of those, right?), because the page they are looking for no longer has the same URL.

Sometimes they will click away and sometimes they will try finding the page they were looking for. Whatever choice they make, their experience of your website is poor. And if it’s the first time they’ve visited, it could be the last.

Be Prepared

It’s natural for a blogger or webmaster to re-organise, rename and delete pages. Sometimes they go out of date or become irrelevant.

As a blogger or webmaster, you can make whatever changes you like, whenever you like, but you should be aware of the consequences of your actions. You really don’t want to lose that hard earned traffic by making a simple mistake.

In this post, I want to explain how to change URLs without losing traffic or driving your visitors crazy.

A Simple Change

Let’s start with a really basic change of permalink, which anybody could make at any time. Here’s the original URL of a page that’s getting a few thousand visitors every week:

http://mydomain.com/blue-widgets/

One day you decide to rename it to incorporate additional keywords:

http://mydomain.com/blue-widgets-for-sale/

The pages have exactly the same content, but Google only knows about the first one, so it keeps sending traffic to the old, non-existent page. Eventually, Google and other search engines will crawl and index the new page, and they may even rank it as highly as the old page.

On the other hand, and here’s the crux, they may not. And, whatever the outcome, it could take weeks or months to happen.

This is because you haven’t ‘told’ search engines (or anyone who bookmarked your page or stored it in Pocket or favorited a tweet) the URL of the page has changed, and they should index the new page and display it in the search results instead of the old one.

(I’ll get to how you do that further down the page.)

Create A Useful 404 Page

Do you know what the 404 page for your website looks like? If you don’t, take a second or two to find out by visiting your site and typing gibberish after your domain name (http://mydomain.com/ksflkjflj).

What you see is your 404 page – you see the same as landing on a dead page.

Take a good look and ask yourself what you would do next? How would you react? Then ask yourself what you can do to improve the page.

At the time of writing this post, here is a screenshot of my useless 404 page. Sure, you can see the menu, there’s an apology and a search button, but it’s not a great experience.

404 error page

With a couple of swift changes, and by creating a custom 404.php file, I get this instead:

404 With Links

It’s still not perfect, but it provides a better solution than the original.

Redirection is the Answer

Now that you know what what will happen if you change permalinks, let’s talk about what you can do to tell your visitors and Google about the change so there’s a smooth transition to the new URL and a minimal drop in traffic.

The easiest way to do this is to setup redirects.

Now, before your head explodes with the thought of how you go about doing this, there are plugins that put redirects in place for you. Sometimes automatically, sometimes manually.

You can also do it via cPanel on your hosting account, but it’s not as easy as using a plugin.

What the plugins do is set up an automatic redirect from the old URL to the new one. So anyone, including search engine spiders, visiting the old page is redirected to the new page. This means you should not lose any traffic, and the search engines replace the old URL with the new one.

Eventually, the new URL will show in the search results in place of the old one.

There are three main redirect codes that tell the search engines the status of the redirect:

  • 301 – Moved permanently
  • 302 – Found
  • 307 – Temporary Redirect

The most commonly used is the 301 status.

Which Redirection Plugin?

My preferred choice is Redirection by John Goldey.

The best feature about this plugin is that it detects changes to permalinks and sets up the 301 (permanent) redirects automatically. It does this straight out of the box.

In what situations would you change the permalink of a page?

  • You may publish a page then immediately notice there’s a spelling mistake that needs fixing (can you hear the voice of experience?)
  • You may want to decrease the length of a permalink
  • You may want to add or remove keywords for the purpose of SEO

Here’s an example page I set up. Take note of the URL.

Testing Redirection

The URL is http://firepress.co.uk/testing-301/ because I’m testing a 301 redirect.

After publishing the post, I changed the URL by clicking on the Edit/OK button and typing my new choice (in this screenshot, the text is highlighted and ready to change):

Editing Redirect

I typed in the new URL, testing-redirection, then clicked OK:

Redirection Complete

Now, if you click this link, which points to the original web address, you will end up at the new address: http://firepress.co.uk/testing-301/

Did you see the redirect happen? It’s so quick, you probably didn’t.

How to Manually Set Up A 301, 302 or 307 Redirect

There are times when it’s best setting up a manual redirect. For example, you may merge two pages with similar content to create a longer and more in-depth resource. You could publish a completely new page or you may adapt one of the originals. Whichever way you go, you will need to redirect at least one URL.

Here’s how to do it.

First, decide if it’s a permanent move or temporary, as there are three settings to choose from:

  • 301 – Moved permanently
  • 302 – Found
  • 307 – Temporary Redirect

Now, open the Redirection plugin: Tools > Redirection

Redirection WordPress Plugin

Add the old URL and the new one.

Source URL is the old page, and the Target URL is the new page:

Add Redirects

If the redirect is staying within your site, you don’t need the full URL (but if you do enter it, the redirection still works). However, if the redirect is linking to a page away from your current site, you should enter the full URL in the Target URL section.

Add Redirect New Site

Now hit the Add Redirection button and look for the success message:

Redirection Success

No test it to make sure it’s working. Do this by entering the URL of the old page into a browser, if it’s working, you will end up on the new page.

If you want to change the default redirection from 301 to 302 or 307, click on the link to the redirect you want to change (highlighted green) and select the option you want from the drop down menu:

Change Redirect Status

Then hit the Save button (hidden, in the above picture):

Save

There are a few more useful features in this plugin, such as logging 404 errors. In the future I might do a full review, but for now, I hope you have learned enough about setting up redirects to stop you losing traffic and to remove any fears you may have had about changing permalinks.

As always, if you have any questions, please ask them in the comments or drop me an email.

Hire Us!

Great news!

We are currently available for hire and want to work with you!

We provide a range of services including web design/development, WordPress technical support, writing content and setting-up and managing AdWords campaigns.

Click the links to find out more.

Comments

  1. says

    Hey Stephen,

    I used this plugins for a long time and thanks for sharing because still there are lots of people are not aware with this. But I worried about that does too many redirection is harm our site?? Your answer is appreciated. :)

    Regards….

    • Stephen says

      Hey Bhavesh,

      It depends upon your definition of “too many”. I wouldn’t redirect one URL to another then another then another (daisy chain), as that could cause confusion to users and search engine spiders. In the case of redirecting one URL to another, I don’t think you can have too many, as long as they are set up and working correctly.

      • says

        That’s great that you yet not redirect any URL i have one blog and first it create in php than after I change the technology and move that all in WordPress technology. But as now think to create a CMS with the help of .Net technology. :) This is my “too many” redirection. Hope you understand and yeah I know I create a mess… :)

        As of now what is your suggestion to wards this?? Just keeping my figure cross and wait for a good response from Google. :)

        Thanks and regards!!!
        Bhavesh

        • Stephen says

          As long as you set them up correctly, you should be okay. I wouldn’t daisy chain more than three redirects though. You should check the original URLs to make sure the redirects are working and and passing the 301 status to the server.

          Try this tool: http://www.internetofficer.com/seo-tool/redirect-check/

          Depending upon the way you set up the site/URLs, it might be easier to use a .htaccess file to handle the redirects. Using such a file goes beyond the scope of this post, but it might be worth speaking to your hosts or doing a search online for more advice.

          I hope this helps?

Leave a Reply