« Back to front page

The XXL Redirect Guide: Proper Use of Redirects

Redirects are an indispensable tool in daily SEO practice, enabling the forwarding of URLs to other or new URLs. If you know how forwarding works and what to look for, you are clearly benefiting from the relaunch or domain move.

This guide covers the most important questions regarding redirects and its correct usage.

What You Need to Know about Redirects

Forwarding, or redirection, is the process of redirecting a URL to another URL as requested by a client (browser). Redirects can be implemented in various ways and can be used temporarily or permanently. A redirect is completed when the client is successfully routed to the destination URL of the redirect.

740x400_Weiterleitungen redirect

There are various application scenarios for redirects. For example, Google explicitly recommends 301 redirect to seamlessly transition from an old domain to a new domain in the event of a domain move. Google has set up its own policies for this.

Other possible applications include:

  • Situations where the index page can be reached via various URLs, for example: http://startpage.com, http://www.startpage.com and http://www.startpage.com/startpage. In this case, you can select a URL to be indexed and redirect the other URLs using redirection.

  • Do you want to combine two of your web projects under a single domain? In this case, you can utilize forwarding to ensure that the “old” URLs are redirected to the new URLs.

  • Have you have edited your website structure and changed the URLs? In this case, new directories may have been created or you may no longer be able to use old directories. If no redirects are established, the server returns 404 error codes when retrieving the old URLs. Forwarding ensures that traffic and link strength is passed on to the new URLs and usability is maintained.

  • Do you use geo-targeting to automatically present your language and international version to your visitors on the basis of the user’s location? Permanent forwarding can be set up for this purpose.

  • Are you are operating an affiliate marketing scheme where links to your website are being tracked through an affiliate system? When a link is clicked, the user is forwarded almost seamlessly to the tracking page of the affiliate-provider and then forwarded to your domain.

  • Do you want to redirect users to a URL that is targeted to a specific device? In such cases, forwarding is temporary and a vary header must be used.

  • Do you want to redirect from http to https in order to avoid duplicate content?

  • Do you want to redirect your website URL from a non-www to www in order to avoid duplicate content?

What Types of Redirects are There?

Generally, this relates to either server-side or client-side redirects. The most common server-side redirects include 301 and 302 redirects. The most frequently used client-side redirect is meta-refresh.

What are server-sided redirects?

A server-sided redirect occurs when an http-request is performed. This happens when a client, i.e. a browser or bot, retrieves a URL and makes a request to a web server. The web server then delivers a status code. In the case of server-sided redirection, the server indicates that the requested document has been redirected to another URL. The client then invokes this new URL, and the user or bot is forwarded.

Servers can issue various status codes according to the RFC 7231 specification. Each of the specified redirects fulfills a different task. The entire process of server-sided forwarding takes only a few seconds and is hardly noticed by the user, depending on the type of redirect. Search engines must interpret each forwarding command and decide how to handle it. For SEOs and webmasters, the question arises as to whether the desired redirect can also pass on link power and ranking signals.
A guide to all important status codes and their effects can be found here.

If both of these relevant criteria are taken into account, the number of SEO-relevant, server-sided redirects can be reduced to the following five:

HTTP Status Code

Temporary or permanent

301

Permanent

302

Temporary

303

Temporary

307

Temporary

308

Permanent

301 Redirect – “Moved Permanently”

For SEO purposes, 301-forwarding is of great importance. It redirects link strength and passes on all relevant rankings to the new destination URL.

The 301 redirect is a useful solution to avoid orphaned pages. You should use a 301 redirect if:

  • You permanently move a domain.

  • You permanently move a document.

  • You are changing the page protocol (http to https).

  • You permanently change the URL structure of your website.

The 301 redirect is for permanent redirection of URLs. Therefore, this type of forwarding is not suitable if, for example, you want to forward seasonal products in your online shop or require redirection to a temporary special offer page.

How Long Should a 301 Redirect Remain Active?

There is no all-encompassing answer to this question. Google itself takes some time to determine that the old URLs have been moved to new ones. These new URLs must first be indexed and output instead of the old URLs. While this process can be done within a few days for small websites with a few subpages, it takes considerably longer for larger projects with several thousand URLs.

Basically, you should keep forwarding in place as long as necessary. Random testing is recommended through site query on Google. This allows, for example, to check whether the new URLs have already been indexed and stored in the cache.

How Do I Set Up a 301 Redirect?

301 forwarding can be implemented via the .htaccess file of an Apache server or with PHP.

1. .htaccess: This file provides instructions for the server to run on an http-request. You need Apache module "mod rewrite" to implement the 301-redirect. The file specifies the URL to which the client is to be redirected.

The contents of an .htaccess file may appear as follows:

RewriteEngine On
RewriteBase /
RewriteRule siteold.html sitenew.html [R=301]

In this case, the page would be redirected to newpage.

2. PHP: You can also set up forwarding via PHP. In order to do so, a code snippet is inserted into the header of the HTML document. When the client calls up the page, the user is redirected to the new URL. This type of forwarding is not server-sided forwarding. However, it is mentioned here for the sake of completeness.

You can find additional ways to implement a 301 redirect here.

302 Redirect - "Found" / "Moved Temporarily"

This redirect shows a client that the requested document is temporarily accessible via a different URL. The 302 redirect, like all 3xx redirects, passes PageRank or relevant SEO signals to the destination URL.

A 302 redirect is recommended if you need temporary forwarding that does not affect your rankings and should not be cached. For example, you can use a 302 redirect to redirect a URL to a special offer page or seasonal product page. Likewise, it is also suitable for tracking or web page testing.

How Do I Set Up a 302 Redirect?

To set up a 302 redirect, you can use the .htaccess file or use PHP, as with the 301 redirect.

An entry in .htaccess for a 302 redirect might look as follows:

RewriteEngine On
RewriteBase /
RewriteRule siteold.html sitenew.html [R=302]

A 302 redirect is always created temporarily. For this reason, you should not use these redirects for permanent URL redirects.

307 Redirect - "Moved Temporarily"

You can use this temporary redirect if a URL has to be redirected for a brief period. This is the case, for example, in the event of server maintenance. As with the 302 redirect, this redirect should not be used for permanent redirects.

What are client-sided redirects?

Client-sided Redirects is not performed by a server, but directly from a client, for example, a browser. Usually, server-sided forwarding is more appropriate. However, in practice there are cases in which client-sided redirects can be used.

Google itself gives an indication regarding this in its Quality Guidelines. For example, forwarding via JavaScript is quite possible:

"Using JavaScript to redirect users can be a legitimate practice. For example, if you redirect users to an internal page once they’re logged in, you can use JavaScript to do so."

Theoretically, forwarding can also be carried out via Meta Content Refresh, in addition to JavaScript redirects. In doing so, a meta tag is set by which the browser redirects the URL to a specified web page after a preset period of time. However, these redirects have long been used as so-called "sneaky redirects" to manipulate websites. Search engines therefore consider this form of forwarding as very dubious.

JavaScript Redirects

This type of client-sided redirect requires clients that can handle JavaScript. They are used mainly for forwarding carried out by user inputs or that refer to redirects between different browsers. Moreover, these forwards can also be used to immediately adapt the destination page to the output device.

A major disadvantage of JavaScript redirect is, as with all client-sided redirects, the dependency on the respective client, for example, the browser. If it can not interpret JavaScript, forwarding does not work. For this reason, you should always favor server-sided redirects.

A JS redirect is inserted as a script in the source code of the page.

<script type="text/javascript">
<!--
window.location = "http://www.newsite.com/";
//–>
</script>

In this case, the user is directed to "newsite.com" when the existing URL is called.

Can Redirects Pass on PageRank?

For a long time, 301 redirects were associated with a loss of PageRank or link power. However, today there are numerous comments from Google employees, which show that forwards pass on PageRank.

Even if it seems to be confirmed that forwards pass on PageRank, webmasters should also consider other SEO factors. There are many other ranking factors that you should pay attention to when redirecting to new URLs.

Google Tool for Changing Addresses

If you forward your URLs with a redirect, you can configure the address change using a Google tool. In order to do so, you need an account for the Google Search Console. Both URLs, the new one and the old, must be set up here. When doing so, it is important that a 301 redirect has been previously performed. If the redirect simply involves a change of protocol, for example, from http to https, the tool does not work.

Here you can set up the changes in the Google Search Console and monitor the redirected traffic
https://support.google.com/webmasters/answer/83106?hl=en.

Checklist: When Can I Use Which Type of Redirect?

Application

temporary or permanent

cacheable

Possible status codes

Website Relaunch

permanent

yes

301

Changes to the URL structure

permanent

yes

301

Geotargeting

temporary

no

302, 307

Affiliate campaign

temporary

Depends on the intention

302

URL bundling

permanent

yes

301

Duplicate Content: Canonical Tag or Redirection?

To avoid duplicate content, there are two common technical possibilities: the canonical Tag and 301-forwarding. While the canonical tag is an HTML meta element, which is implemented in the source code of the page, 301 redirection can be done via the server, for example.

In addition, the canonical tag is not actively redirected to the canonical URL. Rather, it is a reference for search engines that an "original" URL exists, to which the existing document refers or whose copy is the current document. Ideally, search engines should ignore the duplicates and index only the canonical URL. However, a canonical tag is only a recommendation for action that the bot does not necessarily have to implement.

A 301 redirect, on the other hand, is a unique default that the server or client must obey. Even with a 301 redirect, the original URL can still be indexed. However, it will be replaced in the index by the new destination URL of the redirect.

Generally, 301 redirects are the better solution when it comes to cleanly consolidating or redirecting URLs and where there are no reasons to suggest that content is accessible under different URLs. A common reason for this includes, for example, printed versions of news articles. In this case, a canonical tag is the better option to avoid duplicate content, since the printed version of the URL is absolutely necessary for the user.

A Common SEO Error Associated with Redirects is the Forwarding chain

If you use forwarding, especially 301 redirects, you should avoid forwarding chains. Such chains occur when a URL is redirected to another URL that already has a redirect. In extreme cases, the browser or bot can no longer resolve the source request and warns about "too many redirects." Likewise, loading times and server load are increased due to multiple forwarding lines. Further negative consequences of forwarding chains include waste of crawler budget as well as the waste of SEO potential. Google's John Müller, at the request of seoundtable.com 2016, confirmed that Webmasters should avoid and resolve forwarding chains, especially during domain migration.

When undertaking a domain change, it is wise to create an overview of all configured forwards. This enables you to avoid possible forwarding chains in the future.

What are the Effects of Forwarding on the Crawler Budget?

Search engines are continually searching the web for new content. Thus, bots follow links, crawl websites, and index the content as well as other elements. However, there is only a limited crawler budget available for this operation. Webmasters have various options to influence how Googlebot can make the most of its crawl budget. An important factor in terms of crawling is the number of requests that the bot can make to the server.

If a URL is now redirected, Googlebot must execute an additional request. If there are many redirects on a web page, the number of requests increases. At the same time, the bots' crawler budget is reduced. Therefore, you should generally manage forwarding sparingly. This is because when the crawler budget is exhausted by redirects, Googlebot has less time to crawl and index pages. As a result, it is possible that your indexed pages will no longer be up-to-date.

Can I Lose Traffic Through Forwarding?

In principle, any forwarding entails the risk of traffic loss. It is true that Google no longer punishes websites with a loss of link power, if these are forwarded, for example, with a 301-redirect. But ultimately, superfluous, misused, or unnecessary forwarding can be a disadvantage for a web page. This is the case, for example, if you use forwarding deliberately to transfer traffic to a sales page that has nothing to do with the redirected page. An example of such irrelevant forwarding would be if you redirected a high-traffic info page for spectacle lenses to a pure affiliate page via 301. In a 2016 study, it was demonstrated that Google can even interpret irrelevant forwarding as a soft 404 error.

In fact, the link force is only one of many ranking factors passed on via redirect. If, for example, the title is not maintained on the new target page or the content is inferior, a redirection can have negative consequences for the ranking. Therefore, it is recommended that nothing should change apart from the URL when setting a redirect.

Conclusion

If you use redirects correctly, you can fix SEO problems and redirect old domains safely and without major disadvantages to new ones. When undertaking redirects, consider for each redirect as to whether it is really useful and utilize the 301 redirect carefully, in order not to increase server latency unnecessarily or to unnecessarily consume the crawler budget of Googlebot.

Practice makes perfect!
Analyze your website with Ryte for FREE

Start now!

Ryte users gain +93% clicks after 1 year. Learn how!

Published on Jun 1, 2017 by Eva Wagner