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.
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:
One day you decide to rename it to incorporate additional keywords:
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.
With a couple of swift changes, and by creating a custom 404.php file, I get this instead:
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?
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.
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):
I typed in the new URL, testing-redirection, then clicked OK:
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
Add the old URL and the new one.
Source URL is the old page, and the Target URL is the new page:
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.
Now hit the Add Redirection button and look for the success message:
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:
Then hit the Save button (hidden, in the above picture):
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.