Redirects: What They Are and When You Should Use Them
Have you ever noticed that sometimes when you click on one link in your browser, it loads up a different page than you were expecting? This phenomenon is called redirecting, and it happens any time someone types in the URL of one page and ends up getting sent to another page altogether.
Many people think about “redirection” as something you do with pages after they’ve been created, but we want to show you how it can be used before you even start building your site so you can set yourself up for success with SEO from day one!
We’ll walk you through setting up some redirects so that all those old pages still have value to search engines. We’ll also talk about some advanced uses for redirects, like adding them to .htaccess files and using 301 vs 302 status codes.
Understanding SEO and Redirects
SEO, or Search Engine Optimization, is the process of creating content that is easily found by search engines. The most basic way to get your site seen by search engines is to get links from reputable sites.
How does this work? It’s when someone out on the internet points their link at a website and tells their readers, “Hey, check out these pages, guys!”
SEO takes the art of getting discovered and turns it into a science. That’s where redirects come in. A redirect is essentially an instruction for a browser to take one path instead of another. Redirects are great for ensuring old pages don’t go away once you’ve made updates.
There are lots of reasons why redirects are used, but most redirects occur because there’s been some kind of error, like Xbox app login issues, or something has gone wrong with the page that the user originally loaded. Let’s find out more about redirects through this article.
How do redirects fit into SEO?
Redirects are an integral part of search engine optimization, as they have a number of important roles that aid in improving your site’s visibility.
One of these is ensuring that when someone searches for keywords relevant to your business, you show up first. Imagine how frustrating it would be if every time you searched for custom-designed dresses online, thousands of irrelevant results flooded your screen instead.
This is exactly what Google wants to prevent from happening, so they use redirects to check whether there are any duplicate pages on your website before allowing them to appear in search results.
Redirects can also help increase traffic to other sections of your site by forwarding users who click on certain links or enter certain URLs. For example, let’s say you own a restaurant and want people who visit your homepage to see photos of food rather than read about upcoming events or promotions.
Using a 301 redirect, you can direct all visitors who click on the menu to the food pictures page without having to add extra code to each page individually. This will save you both time and money because not only do 301 redirects save coding time, but they also help keep things uniform throughout your website.
Why Redirect at all?
Redirects are simple to implement. That simplicity is a good thing, but it also means that you may want to proceed with caution.
Before setting up redirects, make sure your site architecture makes sense. Do you really need to direct people from a landing page to an archive page? If so, be careful about how you do it (more on that below).
Redirecting visitors should improve their experience—not harm it. If your visitors aren’t sure where they’ve landed or don’t find what they’re looking for, then consider whether redirects are really going to help.
And if they will, try making adjustments before putting them in place. After all, as easy as redirects are to set up, there’s no reason not to get things right first!
So, when should you implement redirects? In most cases, it’s a bad idea to redirect users from one part of your website directly to another unless there’s a very clear relationship between those pages.
A common example would be using a redirect loop when creating subpages or archives within your site structure. For instance, let’s say you have a game download catalog, which includes the RIOT game download. You could create a new page for each item by adding /product-1/, /product-2/, etc., to the URL.
However, these URLs won’t work without some sort of redirection setup because Google doesn’t recognize URLs like /product-1/. Instead, you could create an index page at /product/ and then add 301 redirects from each individual product subpage back to that main directory URL. This way, your URLs remain clean, and search engines can follow them properly.
Some Things to Consider When Using Redirects
Just as redirects can be used to help improve user experience, they can also be used to hide links from search engines.
There are several ways to accomplish both of these tasks by creating redirect rules in your server’s .htaccess file, but before doing so, it’s important to understand how a web browser behaves when it comes across a link that is broken.
A web browser will do three things when it encounters a broken link:
- It will display an error message (indicated by an x icon),
- It will usually report a 404 – Not Found error code (since your URL isn’t in their list), and
- If you have a site map set up, it will follow any other links on your site until it finds one that works or gives up.
The first two points above are not something we want happening with our website. We want our users to see no errors, and we don’t want them following any old broken links either. This is where redirects come into play; by using them, we can control what happens when someone clicks on a bad link or mistypes our address in their browser bar.
Redirects should only be used if you have some kind of good reason for wanting them there; there are no SEO benefits whatsoever to using them otherwise!
The Types of Redirects
A redirect is a piece of code that you add to your site, indicating to search engines where they should go if they find a page on your site that doesn’t exist (i.e., a 404 error).
There are four different types of redirects: 301, 302, 307, and Javascript. All four have their place, but only one (301) is considered a true or permanent redirect. This means that even if Google removes all references to it in its index (or spiders) someday in the future, it’ll always know how to find that content.
Here’s a breakdown of each type so you can understand which is best for you.
- Javascript – These take place behind the scenes without any action from users or search engines. They’re perfect for when you want to hide old content from bots but don’t want to bother with updating URLs throughout your site. However, using them will almost certainly reduce your bounce rate and make visitors more likely to stay on your site longer since they’re not being redirected away immediately after landing on a 404 page.
- 301 – These are considered permanent redirects, meaning they’ll always be in place. Search engines will know to follow them even if they aren’t in their index anymore.
- 302 – These are temporary redirects, which means that they’ll only exist for a certain period of time (usually 30 days). Once that period has passed, search engines will no longer follow them, and you’ll have to set up another one. 301 or 302? The main difference between these two is that 302 redirects can be cached by search engines for up to 30 days, while 301’s cannot.
- 307 – These are a mix of 301 and 302 redirects. They’re similar to 302s in that they’re temporary but can be cached for up to one year. 306 – These are also a mix of 301 and 302 redirects. In fact, these are even more similar to 302s than 307s because they can be cached for up to one month.
How to Implement Redirects
There are several ways to implement redirects, but one of the most common (and easiest) is called server-side redirects. With server-side redirects, you just have to create a .htaccess file and drop it into your directory. Here’s how:
If you are using WordPress, you can easily set up a redirect using a plugin. The most popular WordPress plugin is called Redirection.
- To use, go to the Plugins section on the left side of the screen and select Add New.
- Then search for the Redirection plugin. Click on the most relevant result.
- Select Install now, then Activate.
- Once it is set up, find the Redirection plugin under the list of Tools.
- Next, enter the information you need: the URL you wish to redirect and the new URL you wish to point to.
SEO Best Practices
Though SEO (search engine optimization) has evolved over time, there are still best practices for making your site as easy to find as possible.
- Redirect to the Preferred Version of the Website URL. If you have a website with both www and non-www versions, Google recommends that you 301 redirect all traffic from your non-www version to your www version (or vice versa). This will help ensure that any link equity associated with one version doesn’t accidentally pass over to another. In addition, if you have a site where both HTTP and HTTPS versions are live, Google also recommends that you 301 redirect one version to another. This helps reduce confusion for users who might accidentally type in an HTTP or HTTPS address when they really mean to type in HTTPS. It’s also good practice for security reasons.
- Avoid Redirect Chains. If you’re moving a page from one domain to another, you shouldn’t use more than one 301 redirect to do it. The reason for that is that it creates a redirect chain, which Google considers a bad practice. A redirect chain occurs when there are too many redirects in a row.
- Remove Redirects URL Within Sitemap/Update Internal Links. If you have a website with both www and non-www versions, Google recommends that you remove any redirects from your site’s XML sitemaps so that they don’t get picked up in search results. If you can’t remove them from your sitemaps, then at least update your internal links to point to whichever version of your domain is preferred. This will ensure that any link equity associated with one version doesn’t accidentally pass over to another. In addition, if you have a site where both HTTP and HTTPS versions are live, Google also recommends that you update your internal links to point to whichever version of your domain is preferred.
Final Thoughts
If you’re going to use a redirect, know exactly what you want your user experience to be, whether they type in a plumbing company or the best plumbers. Otherwise, it may be better just to let them type in whatever they want.
That being said, if you have a single product that can cater to both of those searches with some creative copywriting (and yes, there are legit examples of this), then go for it. Redirects should never be used as an SEO trick either; they exist solely to take people from one page or product directly to another page or product with minimal clicking and/or confusion.