Redirecting Websites

September 17th, 2008 by Carl | Filed under Basic SEO, PageRank, SEO tips, URLs.

Suppose that you already own a website that has been running for years and now you are looking to move up the rankings by designing a new search-engine-friendly web site. Or maybe you update several websites that have exactly the same content. Redirecting the web site can improve your ranking and save yourself time and money.

In the last post we talk about domains and we mentioned that you should buy variations in the domain such the .co.uk the .com, .net, etc. in order to protect your company name. What are you going to do with all these domains? Some people have multiple websites with similar content. This is a problem from an SEO point view because one of the factors in ranking is the amount of duplicate content in a page.
If the BBC publishes a news story, it will have a certain authority because it is well respected and trustworthy website. If you were to copy the story onto your website the page would not receive the same degree of respect. Search engines, especially Google, are able to tell that the content is the same and it will mark the page down as being less relevant for a search.

Redirects can help you out. Simply put, a redirect tells the search engine that when it visits a particular page, it should be diverted to another page specified in the redirect.
There are two kinds of redirect:

  • Permanent – when this kind of redirect is encountered, the search engine knows to update its database that the link has moved permanently. These are also known in technical language as 301 redirects as this is the HTTP status code returned when the web page is spidered.
  • Temporary – these tell the search engine that the page has moved temporarily and the URL may return at a later stage. These occur as on domain where by the domain is redirected to another page within the web site. Naturally, off domain redirects will send the browser to another page on a different domain. In technical speak we call both on-domain and off-domain, 302 redirects. At some point in time the site may decide to start showing the original URL.
  • For our purposes, the 301 redirect should be used. When you are moving to a new domain or having a site redesign and the URLs for the new site do not match with the old URLs. If the pages are not redirected, the site will lose the goodwill and trust that it has built up over time.

    The other purpose of the 301 redirect is for redirecting the domains that you may have to a single web site.

    If you run your website on a Linux server, then you will need to edit the .htaccess file. Redirecting a domain is accomplished by adding the following code:

    redirectMatch 301 ^(.*)$ http://www.domain.com
    redirectMatch permanent ^(.*)$ http://www.domain.com

    Using mod_rewrite
    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
    RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

    This last example will also redirect any requests for the non-www version of the website to the www version. Thus avoiding content duplication, if anyone links to the non-www version of the website.

    RewriteCond %{HTTP_REFERER} ^http://domain-variation1.org [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://domain-variation2.com [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://domain-variant3.com [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://domain-variant4.net [NC,OR
    RewriteRule index.html http://www.your-preffered-domain.com [R,L]

    where NC means that the domain is not case sensitive and OR means carry on to the next line.

    Extra Products or Services That May Help
    Domain hosting
    Net Curtains at linen4less
    Create the right impression with our Promotional Folders
    Bookmark and Share

    Tags: , , , ,

    2 Responses to “Redirecting Websites”

    1. International SEO, Search Engines and Duplicate Content | 28/01/09

      [...] solution is to 301 redirect subdomains for different countries to sub-folders of the same web-site. This logistically better as [...]

    2. How TinyURLs Work | 15/04/09

      [...] just take a URL and store it in the database with the base 36 id. When a link is click the URL it 301 redirects the link from the tiny URL to the URL stored in the database.The next URL to be added just [...]

    Share Your Thoughts

    // //]]>