There are two types of redirect utilized by modern websites running on different platforms, and these types are 301 (permanent redirection) and 302 (temporary redirection). In this post we will speak on the permanent redirection type which is 301. So let’s see what it is and when it is necessary to use in WordPress.
A 301 redirect sends a user from one URL to another – this is its main purpose.
When a user searches for a definite information using the search engine, they see the definite URLs with snippets of text in the search results, so they can click those URLs to get to a certain web-page and find what they need. If a redirection is set up, a user will click a certain URL and then be redirected from that URL to another one.
The same happens when a user types a definite website address in the browser’s address bar: a user will be redirected from a certain URL they have typed in a browser to another URL which is set as a destination for redirection.
The reasons for setting up a redirection are as follows:
1. you move from one domain to another;
2. you want to make a re-branding and rename your business website as well;
3. you want to redirect traffic from several URLs owned by you to a single certain URL;
4. you have changed the url address of a definite piece of content but your old URL has definite SEO authority.
Just to make the mentioned above reasons clear, see the following examples:
1. You change a website address but you don’t want to lose your traffic, rankings and devoted users. You can help your users find the required content on your new website even if they type the old URLs and search requests to find you. Here is where redirection comes in handy.
2. You’ve got a new brand name and you rename your website to fit it. So let your customers get to your new website even by typing its old name in the address bar. Redirection is here to help.
3. Let’s see, you’ve got a website called wpexpert.com. There may be a few versions of your domain name such as, for instance, https://wpexpert.com and https://www.wpexpert.com. So no matter which address will be typed by the user, they should be redirected to the same website and bring traffic from different URLs to the definite domain. Redirection is there for you.
4. Sometimes there are situations when you have to change the URL of your certain post or page, but your current URL has been already indexed by the search engines and it has a certain authority for the search spiders.
A page with a certain URL has already got some inbound links which connect it with other pages of the website. Moreover, some external websites can be also linked to that certain page and bring users from other resources. If the URL of that page is changed, all inbound and outbound links will show 404 error when clicked. This situation is pretty harmful for SEO.
In this case, the redirection is required to make users get to the new page’s address when they click its old URL already indexed and available in the search results.
Let’s see how easy it is to make redirection in WordPress. For my purpose I will use Redirection free WordPress plugin available in its official repository.
When the plugin is active go to Tools -> Redirection in your admin dashboard and you’ll get to its settings area. The first tab called Redirects allows to Add New redirect in a simple way.
Put the old URL name into the Source URL field and the new URL into the Target URL field. Select either Redirections or Modified Posts group and click the Add Redirect button.
You will see the statistics of your redirections in the same tab.
Here you’ll be also able to see the log of clicks, 404 errors, and manage more of the plugins options.
As you see, creating 301 redirect in WordPress is pretty easy, so you can use this functionality to keep your SEO good no matter any changes you make with your website.
Hope this was helpful.