URL Redirects Explained & How To Implement URL Redirection | Quattr Blog

Your Guide to URL Redirection & How To Implement Each One Of Them

Learn the Difference Between a 301, 302, and 303 URL Redirect and How to Implement it in an SEO-friendly Way

By Colton Miller

URL Redirects Explained & How To Implement URL Redirects

The internet is an expansive place with endless information and opportunities to explore. But, how much of that content do users consume? When visiting a site, users typically have a goal in mind, whether it be looking up a specific article or viewing a video, which means that the URL plays an essential role in directing the user to their desired destination. 

URL redirects signal users and search engines what part of the website to move to next. They are predominantly used when migrating web pages to a different domain or purging existing web pages. 

This blog post details everything you need to know about URL redirects, including why you should use them, the different redirect types, and how you can implement them on your website.

TL;DR: URL Redirection Explained

A URL redirect is simply the process of directing one URL to another location with different content through an intermediary link. The most common reason you would use a URL redirect is to redirect a page to another page on a different URL.

You use URL redirection to redirect a single URL (or a series of single URLs) to a new location or redirect an entire directory of URLs in the case of a domain migration. URL redirects are set up to improve user experience and guide search engine bots on how to crawl the content.

There are 3 main types of URL Redirects: 301, 302, and 303. There are also 2 lesser-known URL Redirects: 307 and 308. Making 5 in total. Jump straight to the section on Different Types of URL Redirects.

When implementing URL Redirection, you should follow SEO Best Practices to avoid adverse effects on search engine rankings and user experience.

What is a URL Redirect?

A URL redirect is simply the process of directing one URL to another location with different content through an intermediary link. A redirection can also be used for security purposes as well as for maintaining permanent links even if the content changes over time. 

A redirection must be put in place if a page has been moved or deleted, or someone who lands on one of those pages would see an error.

The redirection can be either temporary or permanent. 

The most common reason you would use a URL redirect is to redirect a page to a different page on a different URL. In other words, they are “pointers” to your website that guide users to the correct pages when URL structures change.

Why Is URL Redirection So Important?

URL redirects are set up to improve user experience and guide search engine bots on how to crawl the content. However, when users land on a web page and find an error notice, they may quickly abandon the website. Thus an error page can result in a substantial drop in valuable leads and conversions.

When we click a link, we expect to be taken to the relevant page, not served an error because it has been either moved or removed. This is where redirection comes into place.

URL redirects inform visitors about the URL change by redirecting them to the correct destination.

They also inform search engines about the URL change by sending them to the correct URL. If a visitor arrives at a different URL than the one they wanted, they'll still end up where they wanted to go because you set up a redirect to send them there. This way, you take the user exactly where they want to go, ensuring a good user experience.

It is vitally important to implement redirects, or you might lose search engine rankings and upset your users. So let us now understand when you should use them and how to implement URL redirection.

When to Setup A URL Redirect?

URL redirects can be used for several reasons.

  1. You move the URL of a web page from URL A to URL B

  2. You remove a web page from your website.

  3. Your website no longer uses the old URL you have linked to.

  4. A new page has been added to your website.

  5. Your website is changing its domain, and you want all the old pages to be redirected to the new domain.

  6. You want to merge two web pages or websites

  7. You are migrating from HTTP to HTTPS

You use URL redirection to redirect a single URL (or a series of single URLs) to a new location or redirect an entire directory of URLs in case of a domain migration. Based on your specific situation and end goal, different URL redirects can be implemented.

Different Types of URL Redirects

In this blog, we will discuss server-side redirects, more commonly referred to as HTTP Redirects. The other type is client-side redirects, which are not advisable for SEO purposes. For example, meta-refresh and Javascript redirects are two client-side redirects, and it is strongly advised not to use them.

Server-side redirects are the ones that are most commonly used. They can be further classified into permanent or temporary redirects based on the nature of the redirection. For example, all 3xx redirects fall under HTTP server-side redirects.

Different Types of URL Redirects
Different Types of URL Redirects

1. 301 Redirect

A 301 is a permanent redirect used when you move a page to a new URL. They are used when 

  1. You are purging an old page.

  2. You want to redirect an existing page to a new page permanently.

  3. Redirect an old page to your homepage.

  4. When several URLs are used to access your site, utilize your 301 redirects to redirect traffic to the preferred or new URL by selecting one URL as a canonical and preferred destination.

  5. You are moving your website to a new domain name and want to transition between your old and new website as seamlessly as possible.

  6. You are conducting an HTTP-to-HTTPS migration.

A 301 redirect informs search engines that a change has occurred.

This change usually occurs due to a website migration. If you want to redirect one URL to another permanently, use a 301 redirect.

A 301 redirect is the most commonly used redirect. From an SEO standpoint, setting up a 301 redirect passes the authority of the old page to the new page. Since Google and other search engines follow 301 redirects, it is possible to keep your website’s authority intact after a site migration.

2. 302 Redirect

A 302 is a temporary redirect often used during website maintenance. Use this redirect when:

  1. You want the old page to be accessed temporarily. 

  2. You are updating a page or adding a new page.

  3. You are running A/B testing of a webpage for functionality or design.

  4. You are getting feedback on a new page.

  5. You want to use it for a broken webpage and maintain a good user experience in the meantime.

A 302 redirect informs search engines that the old URL is temporarily unavailable.

It tells them that the new URL is the correct one to use. A temporary redirect does not pass on any authority from one page to another, unlike a permanent 301 redirect does. This means that if your website has many pages with temporary redirection, it might negatively affect its ranking in search results until Google recognizes all of these pages as having permanently moved to their new location(s).

3. 303 Redirect

When visitors use the back button on their browser, a 303 redirect ensures that they will not be able to resubmit forms. This is because a 303 redirect indicates that subsequent requests should be made using the GET HTTP protocol. Therefore, only form submissions should be handled using 303 redirects.

Search engines don't perform POST requests, so the 303 redirect is irrelevant to SEO. Furthermore, the purpose of the 303 redirects is not to redirect URLs after content has moved, so don't use it that way.

4. 307 Redirect

In the same way as a 302, a 307 redirect is an HTTP 1.1 equivalent that can be used when temporary redirecting URLs are needed.

5. 308 Redirect

A 308 redirect is the permanent version of a 307 redirect. Just like a 301, a 308 redirect is an HTTP 1.1 equivalent that can be used when temporary redirecting URLs are needed.

How to Implement URL Redirects?

The most common ways to implement a URL redirect are either in your web server configuration or using your content management system (CMS).

Setting Up URL Redirects In Your Web Server Configuration

Implementing URL redirects in your web server is done through a .htaccess file, which runs on Apache servers, or adding a server block to your Nginx. conf file. 

Web server configuration requires engineering support. If you do not have that, then skip to understanding how to implement redirects directly in your CMS. 

URL Redirects with .htaccess file (when your server runs on Apache)

You can set up a redirect in Apache using the RedirectMatch and Redirect directives. The RedirectMatch directive defines which regular expressions to match, while the Redirect directive specifies which URL to redirect. 

You can also use a 301 redirect in Apache by adding a trailing slash to the end of your URL when you use the Redirect directive. For example, if you want to redirect from http://example.com/foo/bar to http://example.com/foo/bar/, then you would use Redirect /foo/bar http://example.com/foo/bar/.

For more on how to implement redirects in Apache, read here

URL Redirects by Adding Server Blocks (when your server runs on Nginx)

For Nginx, you can set up server blocks for different domains or subdomains that contain unique configurations for each one as needed. You can also use an ‘if statement’ with Nginx's location directive to determine whether a page should be redirected based on its content type or other factors as needed. 

For more information about how to configure redirection in Nginx, read here.

Using Your CMS to Implement URL Redirects

If you have access to your website's source code and your CMS allows it, then you can add redirection rules directly into your site's code using an ‘if statement’ or a function. 

This is probably the best way to do it because your redirects will be located within your site's code and won't be set up in your web server configuration.

Alternatively, you can use a plugin or a third-party tool to help you implement redirects.

One thing to note with third-party tools and plugins is to check their compatibility with your CMS. Read the documentation before using them on your site. Also, ensure that you follow their instructions carefully when configuring redirection rules for your site so that they work correctly without breaking anything else on your website.

SEO Best Practices to Follow During URL Redirect Implementation

Redirects are an essential component of search engine optimization. However, incorrectly implementing them can adversely affect SEO and user experience. Therefore, follow these best practices when setting up URL redirects.

SEO Best Practices to Follow During URL Redirect Implementation
URL Redirection: SEO Best Practices

1. Use Redirects sparsely and wisely

Redirects take up load time and waste crawl budget. Therefore, you only set up a redirect if absolutely necessary. Remember, a redirect should be used to inform visitors about the URL change by redirecting them to the correct destination.

2. Choose the right type of redirect

You should consider your specific needs when deciding which type of redirect to use. You should also consider your website structure. You need to use either a 301 or 302 HTTP status code if you're setting up a permanent or temporary redirect for your site. The other codes may not work correctly in all cases, so it's best to stick with these two options if possible. Decide if you want a permanent or temporary redirect. A 303 redirect should only be used for form submission pages.

3. Redirect to a page that closely matches the content

If you are redirecting a page to a new URL, try to redirect it to a page that closely matches the old page's content. This way, search engines can understand your redirects better, which is a critical step to maximizing the SEO authority.

4. Use a 301 over a 302

If you are redirecting one page to another page on your site, you should use a 301 instead of a 302. This will help search engines better understand your website and may also positively impact your rankings. This is because a 301 redirect passes the link equity, whereas a 302 does not. You should avoid using temporary redirects when possible. Google can easily detect these types of redirects, and they won't be as effective as permanent ones in most cases. Only use 302 when your website is under maintenance. If you wish to permanently remove a webpage with a 302 redirect, then update it to a 301. This will ensure that search engine ranking factors do not negatively impact your website.

5. Avoid Redirect Chains or Loops

A redirect chain is created when there is more than one URL between the source and destination URL. Redirect chains are too long to follow and can take up a lot of time to redirect to the destination URL. This frustrates users who may abandon your site and negatively impacts your search performance. Keep redirects simple and straightforward. This will make it easier for search engines to understand them. Also, ensure there are no broken links if you redirect a page to a new URL. Otherwise, Google may mark your website as broken.

Summary

URL redirects signal users and search engines what part of the website to move next to.

It is crucial to redirect users and search engines to the new URL of a website page if its location is changed. If you don’t, users will abandon your site leading to high bounce rates and low conversions. In addition, setting up the correct URL ensures a seamless user experience journey and high rankings on search engines.

Thus, it is crucial to understand how redirects function, learn about the different types of redirects and conduct some testing to ensure you're prepared to utilize them to avoid common mistakes.

Uncover Any URL Redirection Errors Across Your Website with Quattr

About the Author

Colton Miller is the Sr. SEO Success Manager at Quattr. He has 12 years of experience in selling, servicing, supporting, and strategizing SEO. He has dealt with thousands of sites across hundreds of verticals and has also helped create and define scaled solutions for hundreds of thousands of SMBs and enterprise clients alike. Colton writes about SEO, search engine insights, and algorithm updates. He is always available for questions or comments on Twitter @BigCSEO feel free to connect!

About Quattr

Quattr is an innovative and fast-growing venture-backed company based in Palo Alto, California USA. We are a Delaware corporation that has raised over $7M in venture capital. Quattr's AI-first platform evaluates like search engines to find opportunities across content, experience, and discoverability. A team of growth concierge analyze your data and recommends the top improvements to make for faster organic traffic growth. Growth-driven brands trust Quattr and are seeing sustained traffic growth.