Friday, March 12, 2010

forcing the www subdomain

I've finally decided to force the www sub-domain on Svidgen. This offers a few advantages:
  • I can separate cookies from the "root" site and its sub-domains if the need arises.
  • Search engines / Crawlers will not see "duplicate" sites.
  • People are accustomed to seeing the www sub-domain.
  • In the event that I add additional services using different protocols to the site, the www sub-domain will serve to distinguish the HTTP/WWW server in the absence of the HTTP protocol prefix.
  • The URL is easily recognizable (by real people) as a URL without the HTTP prefix.
Here are the particular mod_rewrite lines that do the trick:

        RewriteCond %{HTTP_HOST} !^www\.svidgen\.com$ [NC]
        RewriteRule ^(.*)$ http://www.svidgen.com$1 [R=301,L,NE]

In addition to the practical benefits listed above, I'm just happier with the way Svidgen URLs look with the www prefix. I'm happy with the decision. And if you're facing the same decision, I recommend forcing the www.

1 comment: