Is a permanent 301 redirect

301, 302 and 303 redirects are in themselves nothing more than Redirects from one web address to another. This can be a very useful and even necessary function for website operators in some cases. For SEO purposes in particular, you sometimes cannot avoid using the relevant redirects.

This can be particularly useful in the following cases:

  • You are creating a completely new website
  • You are fundamentally revising your website and, above all, the navigation structure
  • a subpage changes its address or disappears, but the direct visitors, who are directed there via existing bookmarks or external links, should not come to nothing (error page 404)

Redirects pass z. B. the complete link power (i.e. backlinks, pagerank etc.) to new URLs (websites) so that the ranking is not lost. But which redirects and redirects are there and what do I use them for?

301 Redirect: moved permanently

A 301 redirect tells search engines like Google that the old address of a page is no longer valid and should be taken from the search index. The new URL is permanently (permanently) valid and should retain the full search engine power of the old URL.

To set up a redirect, you, as the administrator of your website, need access to the .htaccess file. The point is part of the file name (on Unix file systems, the point makes a file invisible and not so easy to find).

Here you can see an example of what a 301 redirect in the .htaccess file should look like if the domain name has changed:

Redirect 301 old-page.html

Here the old-page.html on the forwarded.

But also internally old pages can be redirected to new URLs. The following example shows that things are now getting a bit more technical. In the .htaccess you have to enter the following code:

RewriteEngine On

RewriteRule ^ old page \ .html $ / new page.html [R = 301, L]

Another important use case for the 301 Redirect is the forwarding of websites with "www" to without "www" or vice versa. As you have probably noticed many times before, for most websites it is irrelevant whether you call them up in the browser with “www.” In front or without.

For a search engine, however, these are two completely separate websites. However, since both are absolutely identical in terms of content, Google would identify them as so-called “duplicate content” without the appropriate redirect and punish them accordingly. Penalties on Google usually mean not being included in the search. You fly out of the Google index, so to speak.

If you want to redirect your domain without "www" to your domain with "www", you should use the following code in the .htaccess:

RewriteEngine On

RewriteCond% {HTTP_HOST} ^ domain \ .de $ [NC]

RewriteRule ^ (. *) Http://$1 [L, R = 301]

And for the opposite case, please use:

RewriteEngine On

RewriteCond% {HTTP_HOST} ^ www \ .domain \ .de $ [NC]

RewriteRule ^ (. *) Http://$1 [L, R = 301]

302 Forwarding: Found

The 302 redirect is now rarely used. For the sake of completeness, however, I would like to list it here. As mentioned at the beginning, the 301 redirect is a constant redirection. The 302 redirect is exactly the opposite, because it is only a temporary redirect. The old URL remains in the (search engine) index and the link power is not transferred.

303 Redirect: See Other

With this redirection, the old link is also kept in the Google index as before, only the title and the description (meta description) are obtained from the new page. Expressed figuratively, the old page can now be found under a new URL (GET method). This method has recently come under massive criticism and I recommend not using it.

Redirects are not rocket science. However, every website owner should have a basic understanding of this so that there is no rude awakening when looking at Google search. In particular, missing or incorrectly set 301 redirects are often responsible if a website cannot be found in the search engine.

Originally published March 18, 2015, updated July 28, 2020

Recommend this article: