You are invited to Log in or Register a free Frihost Account!

301 Redirect

I've been trying to get a 301 redirect sorted, using PHP, .htaccess and WP plugin but the site checkers are all saying I dont have one in place.

What am I doing wrong?
Solutions for search engine optimization:
the 301-width line means: Moved Permanently status
Why google is expected from a correct forwarding

Are reasons to have to set up forwarding it a number, for example:

A company has several domains on the server:,, etc.

For business communications, all domains required for search engines, they become a problem if all domains have been equipped with the same content as they are repeatedly registered and processed. The user would be displayed like this in the result more and more links with duplicate content. Such redundancy may not even Google

Google says in this case from a duplicate content problem, and evaluates such sites in the rankings from mercilessly.
The solution:
Thanks to a 301 redirect, the website is accessed only once

The permanent redirection with htaccess file can be realized which is placed into the root directory of the web server - but this is the PHP module mod_rewrite needs. - May appeal to the provider.

When mod_rewrite is active, the 301 redirect for example, can be written using a regular expression like this:

Several domains have the same IP address multiple domains, but want to access the Internet can

RewriteEngine on
RewriteCond% {HTTP_HOST}! Www \. Example page \. Com $ [NC]
RewriteRule ^ (. *) $ Http:// \. For page \. En / $ 1 [R = 301, L]

No-www problem: Often, Internet portals are called both "www" and without "www". This ensteht a duplicate content problem, then, should the site with "" callable.

RewriteEngine on
RewriteCond% {HTTP_HOST} ^ www \. example page \. de [NC]
RewriteRule ^ (. *) http://www \. for page \. en / $ 1 [R = 301, L]

Note: In the final analysis must be adjusted by htaccess redirects the server configuration. This is done in the configuration file of Apache server (Linux) httpd.conf
- Access is usually only an administrator in the company or the responsible provider. If you have problems then please ask there.
Plan B: A 301 redirect with php

If partout can not set up htaccess file, there is the possibility of webcasting with PHP function to realize "header". The following code belongs in the index files of all domains to be redirected:


header ("HTTP/1.1 301 Moved Permanently");

header ("Location:");

header ("Connection: close");


If necessary, could be a particular domain to be umgleitet, specifically query:


if ($ _SERVER ['HTTP_HOST'] = "") {

header ("HTTP/1.1 301 Moved Permanently");

header (. "Location:" $ _SERVER ['REQUEST_URI']); exit;}


Another advantage is that the PageRank is transferred to a 301 redirect
Examination of the 301 redirect on the Internet

Whether a transmission output correctly as 301, let's use the following link to verify very well.

Just enter the forwarding address to the result and the destination address will be announced soon
Thanks for your post... It wasnt very relevant to my predicament tho Very Happy
Related topics
Auto redirect your visitors to a different page
Google and Domains: help
301 permanent redirect possible?
Adding a new domain
Just bough need help !!!!
Using Canonical Domains to Sabotage Competitors in Google
Redirect Error
301 Redirect for blogger?
.htaccess redirect?
301 Redirection
Permanent Redirect Not Found on
301 redirection in PHP and .htaccess
Non–www and www Redirect – What Method?
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> SEO and Search Engines

© 2005-2011 Frihost, forums powered by phpBB.