This post is SEO-orientated. In it I will discuss some of the popular solutions for URL redirection in WordPress. The main focus will be on the 301 redirect which is extremely important in terms of SEO.
What is URL redirection?
According to Wikipedia, this is also known as URL forwarding. It is a way to transfer a user and/or search bot from one URL to another. This means that if one web page was originally created under one URL it should be possible to move it to another by using the various redirection methods.
What options do I have in order to perform a URL redirection?
The usual way is to ask the user to follow the new link and to explain to them that the URL address was changed due to a specific reason and that the resource that they are trying to reach is moved to a new location. This is something that I’d not advice you to do because it is not professional (at least in my opinion) and also it is not good for your SEO strategy.
So you have to choose the automatic redirection options. 301 is by far the best and most recommended and I will review it in details in a moment. First I’d like to mention the other methods:
- 300 multiple choices – applicable when a web page is available under different languages;
- 302 not found – preserved for backward compatibility and used for a temporal redirect;
- 303 – see other web page;
- 307 – the new way for making a temporal redirect to a new URL;
- 308 – permanent redirect;
What is 301 redirect?
This is the HTTP Status Code that is used for a permanent transfer from one URL to another. It is very important in terms of SEO, because it allows not only the users to be automatically redirected to the new location of a specific web page, but also the search engine bots. The latter means that the ratings of the older web page can be more or less preserved and transferred to the new one when the bots crawl your website. The SEO way of describing this is called “link juice transfer”.
That is why the importance of the 301 redirect is very big. You can basically keep all of the gained link juice for the old URL and use it for the new one.
Also the 301 redirects allow the search engines to remember the new location of the web page and after a while the index is updated and you can benefit from getting search results in the keywords of the new URL just like you did with the old one.
When should I use 301 redirect?
Every time when you have to change something in the URL address and every time you move the entire website to a new domain or a specific page to a new URL address on your current domain.
Let’s explain this with the following example:
You have enabled the SEO-friendly URL structure in your WordPress website. You are editing a post or a page and you notice that something in the keywords of the slug (the URL address) is wrong. Let’s assume that you can use a stronger keyword or you have made a typing error. So you decide to change this specific word and then update the URL and the post/page.
Most likely every link to this page on WordPress should be updated automatically. But if you have made manual internal and external links (the ones from other websites) and if the page is already indexed in the search engines then the users will get to the 404 page. This is not something that you desire since the user will most likely abandon your website forever (in case of a new visit and a poor 404 landing page) and you will get errors in the webmaster tools section for the different search engines. You will also gain bigger exit and bounce rate which is also bad for SEO and if the search bots cannot find the page it will be removed from the index in time and your overall SEO ratings will suffer.
So the practical way is to make a 301 redirect from the old URL to the new one and all of these things may not harm your website at all. At least the users will get exactly where they intended to without any problems.
The same applies when you move your entire domain to a new one and so on.
How can I make 301 redirects in WordPress?
The professional way is to add some code to your .htaccess file.
It should already contain some code in it so you should keep it and add the following line at the end of this file:
Redirect 301 /old-url-of-the-page/ http://www.yourdomain.com/new-url-of-the-page/
For moving an entire domain using 301 redirect you should put the following code in the .htaccess file of the old domain:
Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
And that’s it! Bear in mind that this may look simple but sometimes it may fail to work if something is wrong with the .htaccess file. That is why this method should be used only by advanced users.
For the beginners I’d recommend the easiest way which will most likely work even when it comes to moving URL’s from one domain to another.
I cannot say that it will work for the whole domain – most probably not. This means that the .htaccess method is needed for a domain redirect.
But for any other 301 redirects you have to install and activate the Redirection plugin.
Once you are done with this you have to go to your WordPress dashboard and click on Tools -> Redirection and then head to “Add new redirection”. Enter the source URL (the old URL) and the target URL (the new one). Click on the blue “Add Redirection” button and you are 100% done!
The page will reload and you will be presented with the created redirect in a table view. You can see its type (301) and the old URL as well as statistics on the hits (a.k.a. the times this redirect was used by either a visitor or a search bot to get to the new URL). You can also see the date of the last access for this redirection.
Simple as that!
What do you think friends? Share your opinions in the comment section below and don’t forget to spread the word about this post on social media.
See you soon!