301 redirects or 302 redirects on a WordPress site or any other site is the process of moving one URL to another URL.
- What is a redirect?
- Why use WordPress 301 redirect?
- Types of redirects
- 301 Permanently Moved
- 302 Found (HTTP 1.1) / or temporarily transferred (HTTP 1.0)
- 307 temporarily transferred (HTTP 1.1 only)
- Meta Refresh
- Explanation of 301 redirects in SEO
- WordPress 301 redirect
- When do you need a redirect to 301 in WordPress?
What is a redirect?
Redirect is a way to send users and also search engines to a different URL than the one they originally requested. The three most common redirects are 301, 302, and Meta Refresh.
Why use WordPress 301 redirect?
Here are some situations in which you might want to use 301 redirects:
- If you have reorganized the site or changed it and changed its address permanently.
- When your content has expired and you want to redirect users to new and up-to-date content.
- Once you merge two sites into one site with a new URL.
All of the above scenarios require you to redirect incoming site traffic to a new location, to the right location so that your site visitors can reach you.
Another reason to use 301 redirect routers is that they conserve up to 90-99% of your search rank.
This means that any social sharing, backlinks, and referrals that helped your old URL get a better ranking will be moved to the new URL ranking.
Redirecting 301 is also a status code instruction that is easily understood by Google.
And this supports the indexing process of the new site and all its new pages more quickly and efficiently.
Other redirects may not be as easily crawled or explicitly searched by search engines which is why 301s are probably the best to use.
Types of redirects
- Redirect 301 – “Permanently Moved” – Recommended for SEO
- Redirect 302 – “Found” or “Temporarily Moved”
- Meta Refresh
301 Permanently Moved
A 301 redirect is a permanent redirect that transfers between 90-99% of the link power (link rating) to the redirected page.
301 refers to the HTTP status code for this type of reference. In most cases, a 301 redirect is the best method for implementing site redirects.
302 Found (HTTP 1.1) / or temporarily transferred (HTTP 1.0)
Some Google employees have pointed out that there are cases where referral 301 and referral 302 can be treated similarly, but our evidence suggests that the safest way to ensure that search engines and browsers of all types give full credit (full rating) is to use referrals. 301 when redirecting URLs permanently.
The Internet runs on a protocol called HyperText Transfer Protocol (HTTP) that dictates how URLs work.
It has two main versions, 1.0 and 1.1. In the first version, 302 referred to the status code “temporarily transferred.” This has changed in version 1.1 to mean “found”.
307 temporarily transferred (HTTP 1.1 only)
Redirect 307 is the successor to HTTP 1.1 of Redirect 302.
While the main scanners will refer to it as 302 in some cases, it is better to use 301 references in almost all cases. The exception to this is when the content is actually transmitted only temporarily (e.g. during maintenance) and the server has already been detected by the search engines as compliant 1.1.
Since it is virtually impossible to determine if the search engines have identified a matching page or not, it is generally best to use a 302 redirect to temporarily submit content.
A meta refresh is a type of reference given at the page level rather than the server level.
They are usually slower, rather than a recommended SEO technique.
They are most often associated with a five-second countdown with the text “If you are not redirected within five seconds, click here.”
A meta refresh does indeed shift the link ranking to the new link a bit, but we do not recommend it as an SEO tactic because in this way it is not really possible to get a high ranking in Google.
Explanation of 301 redirects in SEO
It is common to redirect one URL to another.
It is important to adhere to best practices in order to maintain the strength of your website promotion.
The first common example of this occurs in a simple scenario: a URL that needs to be redirected to another URL permanently.
There are many options to do this, but in general, redirecting a 301 is preferable for both users and search engines.
Filing 301 indicates to both browsers and search engine bots that the page has moved permanently.
Search engines interpret this to mean that not only has the page changed position, but the content – or an updated version of it – can be found at the new URL.
The engines will move the ranking from the original page to the new URL, below:
Note that when you move a page from one URL to another, it will take some time for search engines to rediscover the 301 redirects, identify them, and rank the new page higher than the previous page.
This process can be longer if search engine bots rarely visit a given web page.
Other redirection options, such as 302 redirect and meta-refresh, are poor replacements, as they will not usually move the rating of the previous address to the new address.
The only time redirects are good alternatives is if the webmaster intentionally does not want to move the link rating from the old page to the new page.
WordPress 301 redirect
301 redirect in WordPress can be generated through dedicated plugins and even through the Joost SEO plugin.
In the WordPress system, it is easiest to create redirects, and on my website.
For example, everything works automatically with the Just plugin.
When do you need a redirect to 301 in WordPress?
The main reason to use 301 redirects in WordPress is when the site or page on your site has been moved, and you want to redirect the user to a new page instead such as:
- You must create a redirect when you plan to delete a post or page in favor of new content.
- Or you may need to re-create a redirect when you plan to change the permalinks of your post or page.
Failure to create a redirect will result in a 404-page error for your users.
And this is not only bad for the users, but it can also affect the promotion of your site and hurt its ranking in Google.
This is the moment when 301 redirects become very important.
This allows you to tell search engines and your user browser that the page they are trying to reach has been permanently moved to a new location.
This allows you to move all the strengths of traffic and the page link (SEO) of your old page to the new page.
301 simple references with a wordpress plugin
Simple 301 Redirects Plugin is easy to use. As the name implies, this makes the 301 redirects easy to execute.
Just install and run the plugin then visit Settings »301 Redirects to add your URLs.
If you want to make redirects faster, you can do so using the code method and the .htaccess file.
Redefine 301 redirects in WordPress using .htaccess
Using the .htaccess web server configuration file, WordPress users can configure 301 speed redirects.
Please keep in mind that a small error in your .htaccess code may cause your WordPress site to crash,
And it may start displaying an internal server error.
It is therefore important that you back up your .htaccess file before making any changes.
To edit your .htaccess file, you will need to connect to your site via FTP access. Or through the file management tool from cPanel.
The .htaccess file resides in the root directory of your WordPress site.
If you cannot see your .htaccess file there, you must configure it to show hidden files.
You can edit a .htaccess file in any plain text editor like Notepad.
Below is a simple routing, in which we try to send a visitor visiting an old post to a new post.
RewriteEngine On Redirect 301 /a-very-old-post/ https://yoursite.com/a-very-new-post/
You can add the above code preferably at the end of your .htaccess file.
That’s all for now. I hope this beginner’s guide to creating WordPress redirects has helped you set up redirects on your site.