Did you know that if you don't follow 301 redirect best practices, you could lose a lot of traffic? That's because when you change the location of a page on your website - whether by accident or on purpose - without properly implementing 301 redirects, visitors or search engine bots to the old page will get an error message. And if they're trying to find information that used to be on that page, they may not bother looking any further and leave your site altogether. (Related: Website Personalization Best Practices With Examples)
According to a study by the Content Marketing Institute, 38% of people will stop engaging with a website if the content/layout have a technical issue or is not attractive. So not only do you risk losing traffic by not properly implementing 301 redirects, but you could also be turning away potential customers.
That's why it's so important to make sure you set up 301 redirects whenever you make changes to your website. In this article, we'll explain what 301 URL redirects are and the best practices for setting them up so that you don't lose any traffic - or customers.
What is a 301 Redirect?
A 301 redirect is a permanent redirect (HTTP status code) from one URL to another. When you change the location of a page, post, or other content on your website, it's important to set up a 301 redirect so that visitors to the old URL will be automatically redirected to the new one.
This is different from 302 redirects or meta refresh redirects, which is a temporary redirect. 302 temporary redirects should only be used in cases where the content has been moved but may be returning to the original URL at some point in the future.
For example, let's say you're redesigning your website and want to move your blog from www.example.com/blog to www.example.com/news. You would set up a 301 URL redirect from the old blog URL to the new news URL so that anyone who tries to visit the blog will be automatically redirected to the news section.
Best Practices for Setting Up 301 Redirects
Now that you know what a 301 redirect is and why it's important, let's go over some best practices for setting them up:
1. Always use relative URLs
When setting up 301 redirects, it's important to use relative URLs rather than absolute URLs. Absolute URLs include the full domain name (e.g. https://www.example.com/blog) while relative URLs only include the path (e.g. /blog).
Using relative URLs is important for two reasons:
2. Do not use redirect chains
A redirect chain is when there are multiple redirects from one URL to another. For example, if you set up a redirect from www.example.com/blog to www.example.com/news and then set up a second redirect from www.example.com/news to www.example.com/articles, that would be a redirect chain.
Redirect chains can slow down your website because each time someone tries to access a redirected page, they have to go through multiple redirects before finally arriving at the destination. This can cause frustration for visitors and may even cause them to give up and leave your site altogether.
To avoid redirect chains, make sure that you're only setting up one redirect for each URL. If you need to set up multiple redirects, make sure they're all going directly to the final destination URL.
3. Use redirects sparingly
While redirects are an important part of website maintenance, you should only use them when absolutely necessary. Every time you set up a redirect, it's one more thing that can potentially go wrong and cause errors on your website.
Ideally, you should only set up redirects when you're making changes that will result in the deletion or movement of a web page. For example, if you're redesigning your website and want to get rid of an old blog post, you would set up a redirect from that blog post to a relevant new page on your site.
4. Test your redirects
After setting up any redirects, it's important to test them to make sure they're working properly. The last thing you want is for someone to try to visit an old page on your site and end up getting a 404 error because the redirect isn't working.
There are a few different ways you can test redirects:
5. Redirect 404 pages
If you have any 404 pages on your website, you should set up redirects for them. A 404 page is a page that can't be found, which usually happens when someone tries to visit a URL that doesn't exist.
While it's not necessary to redirect every single 404 page, it's a good idea to redirect any pages that used to be valid but are no longer. For example, if you renamed a blog post and someone tries to visit the old URL, you can set up a redirect so they'll be automatically redirected to the new URL. Redirecting 404 pages can also help improve your website's SEO because it means that any links pointing to the old URL will still work.
To set up a redirect for a 404 page, you'll need to add a "404 Redirect" rule to your .htaccess file.
6. Look for "bad" external 301s
When 301 redirecting to an external site, you need to be extra careful. If the external site is down, has a lot of 404 errors, or is just generally “bad”, it can reflect negatively on your own site.
Before 301 redirecting to an external site, do a quick check to make sure the site is in good shape. You can do this by using a tool like Screaming Frog to check for broken links, 404 errors, and other problems. If you do find any problems with the external site, you may want to consider finding another site to redirect to.
7. Look for redirected (301) pages with organic traffic
If you're using Google Analytics or Google Search Console, you can use the Site Content report to see which pages on your site are getting the most organic traffic.
To do this:
8. Use a tool like redirect mapper
Redirect Mapper is a free online tool that lets you check for redirects on your website. Just enter in a URL and it will show you any redirects that are in place. This can be helpful for finding redirect chains or other problems with your redirects.
9. Use rel="canonical" instead of 301 redirects
If you're moving a page to a new URL but don't want to lose any traffic, you can use the rel="canonical" tag instead of a 301 redirect. The rel="canonical" tag is a way of telling search engines that a certain page is the “canonical” or “official” version of a page. For example, let's say you have two pages on your site:
Both of these pages are about the same topic, so you want to use the rel="canonical" tag on one of the pages to tell search engines which one is the “canonical” page. You would add the following tag to the <head> section of http://example.com/page2:
<link rel="canonical" href="http://example.com/page1">
This tells search engines that http://example.com/page1 is the canonical page, and they should index that page instead of http://example.com/page2.
You can also use the rel="canonical" tag on pages that have similar content but different URLs. For example, if you have a page for “men’s shoes” and a page for “women’s shoes”, you can use the rel="canonical" tag to tell search engines which one is the canonical page.
There you have it! Those are the 9 essential tips for using 301 redirects on your website. By following these tips, you can avoid losing traffic and ensure that your website is running smoothly.
Do you have any questions about using 301 redirects? Leave a comment below and let us know. Happy redirecting!