Skip to main content


A redirect (short for redirect) is an automatic server-side or client-side forwarding from one URL to another. Redirects are used for multiple purposes, such as relocating a web portal to a new domain or maintaining a server. With a 301-redirect, duplicate content can, for example, be avoided.


A redirect is usually always automatic and hardly noticed by the user. Especially on the server side, automatic redirects are ideal for redirecting URLs without affecting usability.

Server-side redirects

With this redirection dynamic, a respective command is entered in the server's htaccess file (most of the time with Apache servers). If the URL is called, the server will immediately redirect to the new destination.

301 redirect

The 301 redirect is a way to permanently forward a URL. This redirect is ideal for relaunching a web portal, to redirect old URLs that are no longer valid to new URLs. The great utility of the 301 redirect is that this redirect passes almost 100 percent of the link juice and gives a clear indication to search engines that the required resource can be permanently found at another URL.

301 redirects can be implemented either changing the .htaccess file or using PHP.

This code is used for the .htaccess file:

RewriteEngine on rewritecond % {http_host} ^ [nc] rewriterule ^ (. *) $$1 [r = 301, nc]

If the 301 redirect is implemented using PHP, the code to be used should look like this. It is entered directly in the source code of the document to be redirected.

302 redirect

With the 302 redirect, the pages were permanently redirected to HTTP version 1.0. Regardless, it is rumored that this routing cannot pass on PageRank. Meanwhile, 302 redirects now additionally feature the entire Power Link, as Google's John Müller indirectly confirmed in his Google+ Article.[1]. In HTTP version 1.1, the HTTP status code now basically says "found", which means that the requested resource is enabled on the server.

307 redirect

With 307 redirect, you can redirect temporarily a web. This is done many times when servicing a server.

For this, a php file is written in which a message for site visitors. This file is stored in the root directory. Then you have to create a new .htaccess file called htaccess.307.

A feasible solution would be the following:

RewriteEngine On Rewrite Base / RewriteCond % {REMOTE_ADDR}! ^$ RewriteCond % {REQUEST_URI}! ^ / 307.php$ RewriteRule ^ (. *) $ [ R = 307, L]

The server displays the 307 status code and redirects the URL temporarily.

Client-side redirects

For redirects in this form, no changes are required on the server as the redirects are stored directly in the source code of the page. Regardless, client-side redirects they are not recommended in terms of search engine optimization.

Meta Refresh

This redirection is configured by placing a meta tag in the header of the HTML document.

This tag looks like this:

A meta update runs on the client, such as the browser. Even though this redirect dynamic can be set up quickly, it has disadvantages in terms of SEO and usability.

Users have to wait several seconds before being redirected to the new page. At the same time, these redirects pass the juice link to the landing page.

Redirect using Javascript

A redirect via JavaScript is recommended only conditionally. First, this redirect presumes that the user's browser has JavaScript enabled and that search engines often interpret such redirects as cloaking or URL hijacking.

If a redirect is done using JavaScript, it can look like this.

document.location.href = ""

Possible dangers

With a client request, each redirect causes a extra step for server. All redirects are written in htaccess data that must be loaded new with each server. For this reason, webmasters and SEOs should not use unnecessary redirects, as they could limit the performance of the web portal.

At the same time, redirect chains, with which many redirects connect to each other, should be avoided. If there are too many, Google will not be able to follow the redirects and the crawler will receive an error.

SEO benefits

A redirect is useful for search engine optimization in many ways.

  • Dead links can be redirected to a new destination with 301 redirect
  • With permanent redirection to a URL, with www to the non-www version or vice versa, double content can be avoided.
  • Users can be alerted about the maintenance of a server for each 307 redirect. In this way a bad user experience is avoided.
  • Through the use of the 301 redirect for the relaunch of a web portal, the loss of link juice can be avoided. At the same time, the redirect prevents dead links from being produced.
  • If a redirect is used, no PageRank will be lost.[2]
  • With a 301-redirect, websites can redirect from a protocol like http to https.
  • In affiliate marketing, the tracking links can be redirected from the affiliate program to the actual landing page.
  • With a permanent redirect, a geo-localized web portal can be automatically redirected to the version with the appropriate language.

Web Links

  • Planning to move to https? Here are 13 frequently asked questions Visited 08/28/2017
  • Rule change in 301 redirect: What you want to know for SEO Visited on 02/01/2017