Search engines like Google, Yahoo and Bing want their searchers to reach the page they expect and not a 404 error. When a website makes changes to existing URLS, then they need to set up a 301 redirect to keep that from happening.
This tells Google the page no longer exists and should instead direct the searcher to a new URL. A 301 redirect for WordPress is a common occurrence for website development and maintenance and there a few ways you can set them up. We’ll also get into how a 301 redirect impacts your virtual private server.
Using a 301 has several benefits outside of changing the URL. It’s one of the most used tools in web design.
Redirects occur when a developer makes permanent changes to a URL. It’s used when transferring from HTTP to HTTP, when you change the name of your site, when you change the format of URLs, etc.
When you change the URL, Google and other search engines don’t realize this. Also, any websites with backlinks to your site will not have the updated URL. Google will still index the original URLs for a while, so this allows you to keep your SEO juice from the original URL and redirect them to the new one.
Another use of a 301 redirect is when a store removes an item permanently. When that URL comes up, websites forward the searcher to the next logical page on the website. For example, if you removed one brand of item, a 301 redirect can take them to the same item, but a different brand.
There are several types of redirects, but 301 is one that denotes a permanent change.
WordPress is one of the leading website platforms in the world. It’s used for both informational and e-commerce sites.
There is a plug-in that helps you create 301 redirects that you can download onto your site. The 301 redirect WordPress Plugin makes the process simple.
There are several plug-ins to use, but they all work the same way for the most part. When you need to create a new 301 redirect, you can enter the source URL and then the new target URL. The plug-in does all the heavy lifting.
When you add plugins to WordPress websites they can weigh your website down. Too many plugins can cause problems because there are so many working at one time or updating. Many times, developers choose to do 301 redirects on their own.
If your website hosts on an Apache web server, you can use the .htaccess file. The file is a configuration file on Apache servers. You use the file to enable to disable various features in the server software,
The file is in the root of the website and you can use cPanel to access and make changes. If you don’t use cPanel, then any text editor will do.
You need to input a redirect command such as “redirect 301 /defunctpage.html /301redirectpage.html.”
If you need to create 301 redirects for the entire site, then you can use the “redirect 301 / https://www.newhttpssite.com.”
If you’re using cPanel, then you access it through the file manager. It might be hidden, so you’ll need to check “show hidden” and open it for editing.
This is the most difficult way to do it and requires at least a functional knowledge of PHP. We don’t recommend this because altering the PHP files incorrectly can cause major problems with the WordPress site.
The best-case scenario is the redirect doesn’t work. The worst-case scenario is the entire site goes down and WordPress can’t open. If you choose this method, do it first on a staging site to make sure the code works before using it on a live site.
A website owner has many options for hosting, including VPS hosting. A virtual private server is an area of webspace configured to look and act like a standalone server. It’s a small piece of a much larger server.
It exists virtually inside a larger server. Despite it being “shared” you have your own dedicated space reserved for you. It acts like a regular server. When you need to create 301 redirects on a VPS, it’s no different than a standard server.
Once again, it depends on Apache .htaccess files. It’s significantly better than a shared server, but less costly than buying your own dedicated server.
Think of sharing hosting like renting an apartment with many friends. A dedicated server is like buying a house. VPS is like renting your own apartment where you have the only access.
There are a couple things to be careful of when using 301 redirects. You need to clear your cache after making the changes. If you don’t, then when you go to verify, it might bring up a cached version of the original page. Clearing your cache keeps this from happening.
You also need to be careful of redirect chains. These are when you have 301 redirects going to multiple URLs. For example, if you’ve had your site for a long time and moved through several lines of products.
When one dropped, you created a 301 redirect to a new URL. You then got rid of that and created a redirect to another product.
Soon, you’re three to four redirects deep. This is bad because it takes longer to bring up your site because Google must go through multiple redirects. It can increase load time and worsen your SEO.
When you need to redirect a web page or site, there is no better way than with a 301 redirect for WordPress. It’s the preferred method for Google and it lets you keep the SEO juice from the original URL.
It doesn’t matter if you’re using a shared, dedicated or virtual server, creating 301 redirects are simple. If you’re interested in learning more about 301 redirects and VPS servers, get in touch with us today.