Recently Posted

Sep
18

301 Redirects – Avoid being penalised by Search Engines

SEO  

Recently we have had several cases where we have started to work on a website and found out that there is more than one domain with the same content on the site. Normally this is a completely innocent case; the owner of the website may have multiple domains for the same company or product. For example they may have the .co.uk and the .com version of the domain. Unfortunately it is quite frequent that the client has set up a domain alias for the domains, where the alias essentially duplicates the original.

The problem with this is that it is believed that search engines like Google will perceive the alias as duplicate content and possibly can black mark both sites, penalising you for duplicate content.

If you have multiple versions of your domain or you decide to move over to a new domain it is important that you should implement a 301 redirect for the entire site or for any pages on your site that need redirecting.

A 301 Redirect is a method of telling web browsers and search engines that a web page or site has been permanently moved to a new location. Usually a 301 redirect includes the address to which the resource has been moved. Web browsers will typically follow 301 redirects to the new location automatically, without the need for user action.

A 301 redirect should be used whenever a website is moved to a new domain name (URL) so that search engines will quickly change their indices and, in theory, preserve the search engine rankings that the site had at the previous domain.

How do you implement a 301 redirect?

This depends on what you host your site on, or what language you have used on your site but here are the most common solutions.

 IIS Redirect

* In internet services manager, right click on the file or folder you wish to redirect
* Select the radio titled “a redirection to a URL”.
* Enter the redirection page
* Check “The exact url entered above” and the “A permanent redirection for this resource”
* Click on ‘Apply’

ASP Redirect
<%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanently”;
Response.AddHeader(”Location”,”http://www.new-url.com/”);
%>

ASP .NET Redirect
<script runat=”server”>
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = “301 Moved Permanently”;
Response.AddHeader(”Location”,”http://www.new-url.com”);
}
</script>

PHP Redirect
<?
Header( “HTTP/1.1 301 Moved Permanently” );
Header( “Location: http://www.new-url.com” );
?>

JSP (Java) Redirect
<%
response.setStatus(301);
response.setHeader( “Location”, “http://www.new-url.com/” );
response.setHeader( “Connection”, “close” );
%>

CGI PERL Redirect
$q = new CGI;
print $q->redirect(”http://www.new-url.com/”);

Ruby on Rails Redirect
def old_action
headers[”Status”] = “301 Moved Permanently”
redirect_to “http://www.new-url.com/”
end

Redirect Old domain to New domain (htaccess redirect)

Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

Please REPLACE www.newdomain.com in the above code with your actual domain name.

In addition to the redirect I would suggest that you contact every backlinking site to modify their backlink to point to your new website.

Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.

Redirect to www (htaccess redirect)

Create a .htaccess file with the below code, it will ensure that all requests coming in to domain.com will get redirected to www.domain.com
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

Please REPLACE domain.com and www.newdomain.com with your actual domain name.

Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.

How to Redirect HTML

Please refer to section titled ‘How to Redirect with htaccess’, if your site is hosted on a Linux Server and ‘IIS Redirect’, if your site is hosted on a Windows Server.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • blogmarks
  • Bumpzee
  • De.lirio.us
  • Furl
  • Ma.gnolia
  • Netscape
  • NewsVine
  • Reddit
  • Slashdot
  • SphereIt
  • Spurl
  • StumbleUpon
  • TailRank
  • Technorati
  • YahooMyWeb

Did you come straight to this page? Why not sign up to our full RSS Feed or read our latest posts?

24 Responses to “301 Redirects – Avoid being penalised by Search Engines”

  1. Olly (1 comments.) said on January 8th, 2008 at 3:52 pm:

    Hi, your 301 redirect saved me!

    I tried a million people but the;

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://www.newdomain.com/1 [R=301,L]

    One worked fine for me!

    Moved from .com to .co.uk!

    THANKS!!

  2. nAEny (1 comments.) said on May 11th, 2008 at 1:20 pm:

    Please Review This Site, You’ll Like It
    Made in china mini digital software

  3. YjjVN (1 comments.) said on May 11th, 2008 at 9:47 pm:

    Hi, Your Site is Very Informative, Thanks
    Chris mccandless photos

  4. Ranvi (1 comments.) said on May 13th, 2008 at 5:54 pm:

    Keep Up The Good WorkRead Your Comment, Loved It bbw pantie hose free

  5. RtUnV (1 comments.) said on June 22nd, 2008 at 5:20 pm:

    check this link for more informationCheck it,

  6. XgRbW (1 comments.) said on June 22nd, 2008 at 10:53 pm:

    Just Use this site for more informationFind All Youre Looking for here,, c++ free learning, c++ free learning, hray,

  7. vRGSf (1 comments.) said on June 23rd, 2008 at 12:14 am:

    Great JobMaybe THats Why Everyone Likes THis Site., cabinet curio free plan, cabinet curio free plan, =DD,

  8. WesNg (1 comments.) said on June 23rd, 2008 at 1:45 am:

    Great JobMaybe THats Why Everyone Likes THis Site.,

  9. OioFD (1 comments.) said on June 24th, 2008 at 1:55 am:

    check this link for more informationCheck it, calendar cute free printable, calendar cute free printable, 8-OO,

  10. jooEv (1 comments.) said on June 24th, 2008 at 7:32 am:

    Now I know Youre Amazing, Great Visions,

  11. tKEQk (1 comments.) said on June 25th, 2008 at 1:11 am:

    Please Look further in this great site,

  12. zBNbk (1 comments.) said on June 25th, 2008 at 2:56 am:

    Bookmark My Site, cam chatting free nude web, cam chatting free nude web, iede,

  13. ecvui (1 comments.) said on June 25th, 2008 at 6:34 am:

    Just Use this site for more informationFind All Youre Looking for here,, cam free people view, cam free people view, 8O,

  14. gyKgG(new comment) said on June 25th, 2008 at 7:42 pm:

    Beautiful wishes, camel toe videos free, camel toe videos free, 041,

  15. hiuzk(new comment) said on June 25th, 2008 at 8:54 pm:

    You Have To Refresh Your Details, camtasia download free studio, camtasia download free studio, ctib,

  16. HBFZu(new comment) said on June 25th, 2008 at 10:07 pm:

    Dont Stop Showing The World What Youve GotYou Can be very helpfull and see here, canada free giveaways, canada free giveaways, 978,

  17. sOYEn(new comment) said on June 25th, 2008 at 11:22 pm:

    Have You Seen This? Brilliant!You Need to see this now!, canadian free online dating services, canadian free online dating services, yie,

  18. MTicY(new comment) said on June 26th, 2008 at 12:37 am:

    Im Impressed From The Site, 100 free music top, 100 free music top, %DD,

  19. ADYit(new comment) said on June 26th, 2008 at 1:57 am:

    Check This Out, GREAT Information, 100mb free hosting picture, 100mb free hosting picture, :-))),

  20. FURJD(new comment) said on June 26th, 2008 at 5:06 pm:

    It Has Great ResourcesGreat Job, Keep up the good work, car draw free page, car draw free page, gfcf,

  21. cHkVW(new comment) said on June 26th, 2008 at 9:26 pm:

    Have You Seen This Already?, card christmas free teen online, card christmas free teen online, >:((,

  22. CIxQj(new comment) said on June 27th, 2008 at 5:54 am:

    Finally, A Usefull Website. , 110cc bike free pocket sale shipping, 110cc bike free pocket sale shipping, cbdtgo,

  23. JRcni(new comment) said on June 27th, 2008 at 7:04 am:

    You Can Find Everyhing you want here, 132 download dvd free region, 132 download dvd free region, =-))),

  24. TewTz(new comment) said on June 27th, 2008 at 11:23 am:

    You REally Have TO See This…, 1985 cab club ford free wallpaper, 1985 cab club ford free wallpaper, =-[[,

Leave a Reply