Sponsors

MillionDollarBlogLog
Build, Generate and Celebrate
Send a Mystery Valentine Card to that special one
Buy Fresh Content

I'm a Dropaholic on


Yzoo Search

Translator

English flagItalian flagKorean flagChinese (Simplified) flagPortuguese flag
German flagFrench flagSpanish flagJapanese flagArabic flag
Russian flagGreek flagDutch flagBulgarian flagCzech flag
Croat flagDanish flagFinnish flagHindi flagPolish flag
Rumanian flagSwedish flagNorwegian flag  
By N2H

OnMySiteNow

Stats by OnMySiteNow.com

FireStats

  • Pages displayed : 161125
  • Unique visitors : 30391
  • Pages displayed in last 24 hours : 1367
  • Unique visitors in last 24 hours : 352
FireStats icon Powered by FireStats

Sponsors

Top DropaHolics

Last Months DropaHolics on this blog


Server Aliases and 301 redirect

January 27th, 2007 by Greg

For the ten years I have had a web site every server has used a Server Alias in the web server configuration so that domain.com and www.domain.com both point to the same site.

This is great as it means that the site is accessable with or without the www. in front of the domain - I am surprised the amount of sites where this does not happen.

I found out recently though that by having a server set up this way could lead to problems with search engines as they are treated as two seperate sites and could therefor be punished for duplicate content.

There is a way around this problem using a 301 redirect. What a 301 redirect does is tell the visitor/search engine that the url they are trying to access has moved. So you could set up a 301 redirect to redirect all traffic from domain.com to www.domain.com or visa versa. This way the search engines will treat both urls as the same site and duplicate content would not be an issue.

A 301 redirect can be set up in either your servers configuration file or in the .htaccess file.

Here is an example based on a 301 redirect I have set up in my server configuration file:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.domain.com
RewriteRule (.*) http://domain.com$1 [R=301,L]

This redirects http://www.domain.com/anything.ext to http://domain.com/anything.ext

Posted in Hosting, SEO |

Leave a Reply

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.