What does it do?
Takes any request to a domain that doesn't start with www and redirects it to the same domain, but with www. added on to the beginning.
Why do I need this?
  1. Your DNS vendor (like GoDaddy) will not let you put a CNAME on a bare domain name and you are using a service (like Google AppEngine) that requires a CNAME.
  2. You want to force everyone to use www but do not want to code it yourself.
How do I set it up?
Just point any non-www DNS entry to
Does it work for secure (https:) sites?
No. Even if I did get a certificate, people would still see a ugly "certificate domain mismatch" error before it redirected them.
Is it free? Why?
Yes. I am using it for my own projects, and I cannot really see anyone paying me to use it (certainly not enough to justify setting up a billing infrastucture). So I am running it as a community service. Let me know if you are interested in being a sponsor. I will put your logo on the home page above the credits.
How stable is the IP address?
It should be completely stable: it is an Amazon AWS Elastic IP. It is not tied to specific hardware, so I can move around as needed.
Is the redirect temporary (302) or permanent (301)?
Temporary (302) redirects. I considered using permanent redirects, but the potential for problems outweighed the benefits.
What about robots/search engines/SEO?
I specifically do not redirect requests for robots.txt. Instead, I tell robots not to index anything on a bare domain. Robots should go directly to the www domain instead.
How reliable is it?
It should be reliable, but, as with most free services, there are no guarantees.
What if I need a 100% uptime guarantee?
Then you should host your own. Really, all it takes is a 5 line .htaccess file on an Apache server with a static IP.
What if I screw up and point my www DNS entry here by mistake?
The redirect for will always be a temporary redirect, so as soon as you fix the DNS entry, it should start working again.
How does it work?
Apache mod_rewrite rules in .htaccess. I am not an expert, so if you find something wrong (or a better way to do it), let me know. Be sure to look at the existing rewrite rules first.
Is mod_rewrite really the best way?
I thought about doing it with a .php script. I would have better logging, and could do custom redirects to other domains. But the mod_rewrite way is so simple and is all that I needed for myself.