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.
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.
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.
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.
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
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.
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.
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.
The 301 redirect is a tool used in SEO that tells the search engine to permanently redirect a URL to another URL. The 301 redirect tells the search engine that the page has been permanently moved and that the old URL should no longer be indexed.
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.
301 redirects are important for SEO because they help maintain the authority of a website's links when changes are made to the website's structure or content. When a 301 redirect is implemented, the old URL is redirected to the new URL, which helps keep the ranking of the old URL intact. This is important because it can help preserve the ranking of a website's pages when changes are made, such as when a page is deleted or moved.
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 302 redirect is a temporary redirect from one URL to another. A temporary redirect does not pass on any authority from one page to another, unlike a permanent 301 redirect. 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).
If a 302 redirect is in place for a long time, it will affect SEO as it will be seen as a permanent redirect. Over time search engines will "forget" about the old URL, and the site's ranking will suffer as a result. Thus, you should use a 302 redirect should only be used when there's a temporary change in URLs, such as when a site moves to a new domain. It should not be used for long-term redirects, as this will negatively impact the site's SEO.
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.
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.
Similar to a 302, a 307 URL redirect is a way of telling a search engine that a page has been moved, but the new page is still available. This can be helpful if you have a page that is no longer live, but you don't want the search engine to remove it from their index. However, if the new URL is not accessible, the search engines may drop the ranking power of the old URL. A 307 redirect is temporary and often not seen as good for SEO as it can confuse users and can be a waste of time if the page is not accessible.
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.
Similar to a 301, a 308 redirect tells search engines that the content has been permanently moved and that they should update their search index to reflect the change. A 308 redirect impacts rankings as positively as a 301 and is a signal to search engines that you value your site’s content and want to ensure that users can find it.
Hopefully now you are clear with what each of the URL redirects mean and the types of redirects. Wile these 5 are the most common redirects, there are more status codes in the 3xx redirect class. Read all about them in our blog on HTTP Status Codes.
The most common ways to implement a URL redirect are either in your web server configuration or using your content management system (CMS).
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.
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
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.
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.
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.
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.
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.
Try our growth engine for free with a test drive.
Our AI will analyze your website and provide you with insights on the top opportunities for your site across content, experience, and discoverability metrics that are actionable and personalized to your brand.