Redirects
|

Redirects: Everything You Need to Know for Effective Website Management

Introduction to redirects in SEO

Guide to redirects in seo

Redirecting is when a URL points to a new destination. They indicate search engines and browsers about a URL and where to find the web page. It involves code implemented to a specific URL or a group of URLs, so that the user (or search engine) is sent to a different page to the actual URL that was clicked. You can set them on your own web server or even in the source of the web page you have created. They should be correctly implemented as they affect how your site is crawled and indexed by the search engines

Different types of redirects

Redirects can be classified on the basis of their status as follows:

Permanent redirects

These redirects are used when an old URL (resource) has been permanently moved to a new location. The most common permanent redirect is a 301 redirect.

Temporary redirects

These redirects are used to indicate the URL that has moved temporarily to a new location. These redirects are used during website maintenance when a page is unavailable for a short period of time. The most common temporary redirects are the 302 and 307 redirects.

Special redirects

These redirects are used for specific purposes, such as redirecting users to a different language version of a website or to a login page. Redirects are also classified in forms of HTTP redirects, HTML redirects and Java redirects.

HTTP redirects

HTTP redirect is a mechanism used by the server to inform the visitor that the requested resource has moved to a new location. When a client sends an HTTP request to a server and the server responds with a redirect status code, the client will automatically redirect to the new URL specified in the response.

Every status code is composed of a three digit number and the first digit demotes the type of the response. HTTP 3xx status codes denote a redirection. These status codes instruct the browser to redirect to a new URL, which is defined in the location header of the server’s response.

When your browser gets a redirection request from the server, it needs to understand the nature of this request. All such requests are handled by various HTTP 3xx redirect status codes.

This is commonly used when website has either changed its URL structure or when a web page has been moved to a new location. Here are some common types of HTTP redirects:

• 301 Moved Permanently

• 302 Found

• 303 See Other

• 307 Temporary Redirect

• 308 Permanent Redirect

• 301 Redirects

When to use 301 redirects?

301 redirect indicates all users that request an old URL will be automatically sent to a new URL. A 301 redirect is a permanent redirect and is the best method to use if you must redirect your website.

It also passes all ranking power from the old URL to the new URL. This means that the detour page is now the main page. The old page will no longer be shown in the search engines index pages, and it will be replaced by the new url.

• It is the best method if you need to permanently move from an old to a new URL.

• It passes full link equity to the new URL location.

• It is a fast and seamless redirection method.

• It doesn’t hurt your SEO ranking at all.

• All users will be automatically redirected to the new URL when they visit an old URL.

• It indicates to search engines that the old URL should be removed from their index.

When to use 301 URL ?

1. Changing a URL

• If your original URL was poorly optimized, you can permanently redirect it to the new URL

• If you are re-organizing the folder structure of your website URLs, you can move to a new URL

• It can also be used to redirect users to a more specific or relevant page

2. Re-purposing a piece of content

If you want to completely recreate content by creating a new page and replacing the existing one, you need to use 301 redirect. It is also used when you want to completely rebuild your old piece of content on an entirely new page.

• 302 Redirects

302 redirect is a temporary redirect?

 A 302 redirect is a temporary redirect used for redirecting your site visitors to a different page temporarily, as the webmaster plans on bringing back the original page later.

 Features

•  It is a temporary redirect.

•  It does not pass full link equity to the new location.

•  It indicates to search engines that the old location should still be indexed.

•  A poorly configured 302 redirect could hurt your search engine rankings.

When to use 302 redirects?

302 redirects are usually more complicated to set up and maintain than 301 redirects, and one must use them sparingly.These redirect should be used when you want to temporarily redirect a web page, such as during website maintenance or when a page is unavailable for a short period of time. Here is an example of how to use a 302 redirect for site maintenance:

Redirect 302 /old-page.html https://new-website.com/new-page.html……not used in content

• 303 See Other

303 redirect can be used to redirect a user from a POST request to a GET request

A 303 is a type of temporary redirect, which is specifically used when the request method is required to be changed when the user is redirected.

A 303 See Other message indicates the resource can be found at another URL by using the GET HTTP method. It is typically provided in response to a POST, PUT, or DELETE HTTP method request. It informs the client that the server successfully received the data associated with the request and instructs the client to send a new GET request to the new URI provided by the server.

For instance, a 303 redirect can be used to redirect a user from a POST request to a GET request. Another example of using 303 redirect can be, if a user is submitting a form to a server and you want a user to be redirected to a thank-you page after the form is submitted.

Features

• The old URL is still valid, but the user and search engine should be redirected to the new URL for this specific request.

• It does not pass full link equity to the new URL

• Search engines will not update their search results to show the new URL

When to use 303 redirects?

It should be used after a POST request as it tells the browser to repeat the request but using the GET method. For instance if a user submits a form to create a new account, the server should return a 303 redirect to the confirmation page, so that the user doesn’t accidentally create multiple accounts.

It is also used to indicate the browser that the requested resource has been moved permanently to a new location. For instance if a blog posts or product pages that have been moved to a new URL, in such case the server returns a 303 redirect to the new URL.

307 temporarily redirect    

308: Redirected permanently

The 307 redirect came into existence after the 302 redirect. It should be used only when a temporary redirect is needed and the server has been confirmed to be 1.1 compatible.

The 307 is a temporary redirect that tells the user’s browser to redirect the user to the new URL, but to keep the same request method. As the redirection may change in the future, the client should continue using the original URL for future requests as the server may eventually move the resource back to its original location.

However, it is impossible to know with any certainty if the search engines have identified a page as compatible with 307 redirects. The reason is that 307 has relatively new features that are not supported by all search engines. The best option is to use a 302 redirect, even if the resource has been moved only temporarily. 302 redirects are more widely supported by search engines, and they will ensure that your pages are still indexed and ranked in search results.

Features

• The old URL is still valid; however, the user and search engine should be redirected to the new URL for this specific request.

•  It does not pass full link equity to the new URL.

•  It is more specific about how the client should handle the redirect than a 302 redirect.

When to use 307 redirects?

When a page is unresponsive due to website maintenance, 307 redirect can be used to redirect users to a different page. It is important to note that 307 redirects are not as widely supported by search engines. It is therefore recommended to use a 302 redirect instead of a 307 redirect, unless you have a specific reason to use a 307 redirect.

308: Redirected permanently

eslblog 2023 11 10T125148.706

308 permanent redirect is an HTTP status code that indicates that the requested resource has been permanently moved to a new location, so the old URL will no longer be used, and it is replaced by the new URL.

When a web browser receives a 308 Permanent Redirect status code, it will automatically redirect the user to the new URL. Search engines will also update their links to the resource to point to the new URL.

• It is a permanent redirect status code, and it automatically redirects the user to the new URL.

• It allows you to specify a POST or GET request at the target location.

• Google will pass link equity (or “link juice”) from the old URL to the target URL and, over time, will replace the old URL with the new one in its index.

In contrast to the 301 Moved Permanently status code, which let the client to modify the HTTP request method, the 308 Permanent Redirect status code requires the client to submit an identical HTTP request to the designated Location. 

A 301 Moved Permanently HTTP answer, for instance, informs the client that it is OK to modify the POST HTTP request to a GET HTTP request for the subsequent HTTP request in response to a client’s POST HTTP request. However, the 308 Permanent Redirect response code mandates that if the initial HTTP POST request was a POST HTTP request, the subsequent HTTP POST also has to be a POST HTTP request.

When to use 308 redirects?

A 308 redirect is used when the domain name of a website is changed. It is also used when a website is moved to a new server. These redirects can also be used to redirect users to a more specific or relevant page.

JavaScript Redirects

JavaScript Redirects

Java script redirects can be implement while processing JavaScript file at the final stages of the page load using the HttpURLConnection class. It allows you to control the behavior of the redirect, such as whether or not to follow redirects and whether or not to send cookies.

Java redirects are typically used when you want to redirect users to a different page on your own website. However, they are not as preferred as HTTP redirects as they don’t return the status code 301 (move permanently) as server redirects and also they will work only they will work only if a client has enabled JavaScript.

Here is an example of a code to redirect a page using JavaScript, use

window.location.href = “https://www.site.com/”;

Why Java Script Redirects are not preferred?

JavaScript redirects are generally avoided as it causes following issues

  1. If a user disables JavaScript, the redirect will not work.

2. Readers need to render a page to find the redirect.

3. Search engines may index the wrong content.

HTML Redirects

HTML redirects are client-side redirects.

HTML redirects are client-side redirects. They are also known as meta-fresh redirects. HTML redirects are used when a special <meta> tag in the page’s HTML code is used to redirect users from one page to another. Here is an example of HTML code that will redirect the user to the page: https://www.site.com/new-page.html.

HTML

<meta http-equiv=”refresh” content=”0; url=https://www.site.com/new-page.html”>\

The value placed in the content attribute is the number of seconds after which a redirect is required. For instance, if you want immediate loading, such a value should be set to zero.

When implemented, these redirects send users and search engines to a different URL than the one they originally requested.

However, HTML redirects are not much preferred, and they must be used sparingly. There are certain cases when HTML redirects are necessary, such as

• You cannot use an.htaccess file because your CMS overwrites it.

• You want to redirect only one file in the directory with multiple files.

Why are HTML redirects avoided from the point of view of SEO?

In practice, HTML redirects are not the preferred method of redirecting users for many reasons:

• HTML redirects are client-side redirects, which means that the redirection is handled by the browser after the page has been loaded. However, it is a slow and less reliable method for redirecting. It can also cause problems for users with slow internet connections and for those who are using screen readers. Slow page loading will have a negative impact on

• Bounce rates

• User experience

• Conversions

• SEO rankings

• HTML redirects are not the preferred method of redirecting users for permanent redirects. Instead, one should use server-side redirects, such as 301 redirects.

• HTML redirects are also not suitable for redirecting users for temporary redirects as they can be difficult to implement and manage.

• It is typically not recommended to use HTML for pages that are important for SEO, as these redirects dilute the link equity of your pages and make it more difficult for them to rank in search engine results pages (SERPs).

Common redirect mistakes that are hurting your SEO

Mistake 1 # Redirecting all the web pages to the home page

If you are trying to secure better rankings by redirecting everything to the home page, it will do more harm than good. In this way, you will lose all the signals that are associated with the old content and it will have bad impact on your user’s experience. You will also lose the value of the content that you be creating for years

Google’s John Mueller has also expressed in a webmaster video that redirecting all of your URLs to your home page is bad practice. Instead, one should redirect those URLs on a one by one basis to the proper new location. 

Mistake 2 #Redirecting to irrelevant content

Redirecting users to the similar content to the requested content is a sound practice. But if you redirect users to irrelevant content, it will ruin the user’s experience and it will hurt your website’s reputation and rankings. For instance, if users are redirected from a page with a particular smartphone to another page with smartphones from another manufacturer, it will ruin their experience and your reputation.

This also often happen when webmaster delete a page as they redirect site visitors to the main page instead of showing them the 404 page. It is not a sound practice from the point of view of SEO as well. If you don’t have page with similar content, don’t redirect at all.

Mistake 3 # Redirect Chains

A redirect chain is a series of redirects between the initial URL and destination URL.  For example, if you redirect web page A to web page B, and then redirect page B to page C, it will be regarded as a redirect chain.

Ideally, there should be only one redirect in a place so as to create shortest path to desired content. This is especially true for older websites, which have often been through multiple redesigns or restructures over the period of time. Apart from it, internal links and canonical tags can also be a source of redirect chains, if they’re not updated when a URL changes.

One common mistake related to redirect chains is creating a redirect loop, a situation when a page redirects to itself, or to another page that redirects back to it. Such practice may create an infinite loop, which can cause users and search engines to get stuck.

Another common mistake is using a way too many redirects in a chain. Search engines usually follow only 5-10 redirects in a chain. If there are a large number of redirects in a chain, it is likely that some of your pages will not be indexed or ranked properly.

In order to avoid such mistakes, it is important to carefully check your redirects before you make them live. You can use a site audit tool to test your redirects and make sure that they are not creating redirect chains or using too many redirects.

Here are some tips for avoiding redirect chains:

• When implementing redirects, it is important to keep them to the minimum as it will affect the page load speed as each redirect adds a small amount of time to the page load time. It will also dilutes the link equity that’s passed along to the new URL.

• Use redirects only when they are absolutely necessary. For instance, if you’ve moved a webpage to a new URL, you will need a redirect to send users to the new location. However, if you are making only minor changes in the page, you don’t need to redirect. Some of the examples of minor changes for which you don’t need redirect are fixing a typo in a paragraph, updating a price on a product page, removing a broken link and so on

• When you are required to use a redirect, make sure it’s a 301 redirect. It indicates the users and search engines that the page has been permanently moved. Most of the other kinds of redirects can cause problems, especially for SEO.

• Check your website at regular intervals of time for redirect chains. There are free tools like Google Search Console to identify and fix redirect chains.

Mistake 4 # Creating internal links to old or wrong URLs

When you use redirect, make sure to find and redirect all internal links to the right URLS.

To get the complete list of internal links to redirected pages easily: go to the Site Audit in ESL Ranks Pro, click on the SEO Issues discovered, and find all the internal links with redirects

Mistake 5 # Making a wrong choice between Canonical and a 301 redirects

Many times webmasters mistake redirects for canonical tags and often make wrong decision. A 301 redirect shows that your page has changed its URL address permanently, so that search engine crawlers need to use a new address and remove the old one from the index.

However, when you use rel=”canonical”, you indicate that there are a few versions of the page on the website, and both are available to a user. When using a canonical tag, you ask crawlers to scan and rank a particular page however it is just a recommendation and not a directive and you are not guaranteed that search engine will crawl it.

When to use Canonical tag?

If there are multiple versions of a page that are essentially the same, such as a product page that is accessible from different categories or an article accessible from different tags or when you have syndicated your content on another website, canonical tag should be used.

When to use a 301 redirect?

• When have permanently moved a web page to a new location.

• When you have deleted a webpage and you want to prevent users from getting a 404 error page.

• When you have merged two webpages to create a single page

When you are not sure which one to use, your best bet will be using a 301 redirect. This will ensure that the users and search engines are taken to the right page.

Mistake 6 # Not redirecting at all

Another common mistake is not redirecting at all. The objective is to constantly improve the lead generating process for your company, thus this should be taken into account depending on the circumstances. A lot of issues could arise if you go through your website and delete outdated pages or change URLs without using redirects. The same holds true for starting a new website and launching it, as well as moving from HTTP to HTTPS. Redirects are something you should consider if you are adding, deleting, or modifying URLs. Redirects in general are something you should think about for your URL structure. Whether or not your URLs will start with www is a common issue you should ask yourself and your teams. If you don’t apply the proper redirects, search engines will treat your www and non-www pages as separate and duplicate content.

Mistake 7 # Ignoring the case sensitivity

When writing redirect rules, it is important to consider case sensitivity because web servers are case sensitive by default. It means they will handle the request for /example will be taken differently than for /Example

In other words, if you have implemented a redirect rule that redirects /example to /new-example, but someone visits /EXAMPLE, they will not be redirected.

How to overcome case sensitivity in redirects?

Use case-insensitive redirect rules – Many web servers and redirect management tools support case-insensitive redirect rules. This means that you can create a single redirect rule for /example and it will redirect all requests for /example and /EXAMPLE.

Redirect all requests to lowercase – Redirecting all request to lowercase is the best way as the majority of users will type the URL in lowercase. You can use a web server configuration file or a redirect management tool to redirect all requests to lower case. For instance, you can use the following .htaccess directive:

RewriteEngine on

RewriteRule^(.*)$ ${lowercase:$1} [L,R=301]

It will redirect all requests to lowercase before they are processed by the web server.

Additional tips

• If you are using case-insensitive redirect rules, make sure that all of your URLs are written in the same case. For instance, if have a redirect rule for /example, make sure not to create similar redirect rule for /EXAMPLE.

• Once you have created your redirect rules, make sure to test them to ensure they are working as expected. This can be done by visiting the source and destination URLs in your web browser.

The best practices to overcome redirects for optimal website performance

Based on above discussion, following can be considered as the best practices to overcome redirects and ensure optimal website performance:

Identify and fix redirect chains:

You can use ESL Ranks Pro to identify redirects causing SEO issues. Once you have identified any redirect chains, you can use ESL Ranks Pro to fix them by creating new redirects or by updating existing redirects. A thorough analysis of URLs can also help you find the redirect loop issue; however, manual checking may not be the perfect approach for large websites.

Create a redirection plan.

You need a proper plan to deal with redirect issues from the start. It is a sound practice to begin with creating a spreadsheet that outlines the list of original pages that need to be redirected, along with their destination URLs.

Avoid unnecessary redirects.

Redirect should be used only when it is absolutely necessary to do so. If it is possible to maintain a consistent URL structure, avoid creating redirects altogether. It will enhance the user experience and eventually increase the ranking of a site.

Use proper HTTP status codes:

One must use the right HTTP status code for each kind of redirect. For instance, a 301 status code should be used for permanent redirects, and a 302 status code should be used for temporary redirects.

Use redirect correctly.

Make sure that redirects are correctly configured in your website’s code or CMS. Make sure to update your XML sitemaps every time you set up a redirect. Otherwise, they can cause errors and disrupt user navigation.

Monitor redirects regularly

It is important to regularly monitor redirects, as they sometimes break or become obsolete. One must regularly monitor them to ensure they are working properly and directing users to the correct pages.

Use canonical URLs for duplicate content

If you have multiple URLs that lead to the same content, it is recommended to use the canonical tag. It will help to prevent duplicate results in the organic search and ensure your website is reaping the SEO benefits.

Test redirects before deployment

Make sure to test your redirects thoroughly before deploying them. It will help to ensure they are working properly as well as dealing with unexpected issues

Consider case sensitivity

If your website uses URLs that are case-sensitive, ensure that your redirects account for this difference. Otherwise, users may end up on the wrong page if they enter the URL with the wrong capitalization.

Communicate redirects to users

When making significant changes to your website’s URL structure, you must take all necessary actions to inform your users about the redirects to avoid confusion and ensure a smooth transition.

Do you want to get a personalized plan to deal with your redirect issues? Get in touch with us to unlock your website’s ranking potential,

Similar Posts