However, there is a neat hosted service called wwwizer which will redirect your no-www domain to your www domain, for free.
Here are my steps for hosting a naked domain with wwwizer on dotCloud. I also threw Cloudflare into the mix because they have a nice interface for editing DNS records and some other cool features (CDN, DoS protection, etc.). Using Cloudflare is not required for wwwizer to work.
- Add the domain to Cloudflare
- Cloudflare will copy your existing DNS records
- Cloudflare will provide you with two new name servers (x.ns.cloudflare.com and y.ns.cloudflare.com). Delete all your existing NS records and replace them with the two Cloudflare name servers.
- Wait until the nameservers switch over, you will get a message in the Cloudflare admin area. You can also check an HTTP response from your server, the "Server" HTTP header should say "cloudflare".
To host the site on dotCloud you then make these two changes from within Cloudflare:
- Set the A record for example.com (the naked domain) to 220.127.116.11 (wwwizer.com)
- Set the A record for www to the IP address of gateway.dotcloud.com
Now your naked domain example.com will redirect to www.example.com, which will be hosted by dotCloud. Step #6 is the only part that is specific to dotCloud, just change this to whatever your PaaS provider tells you to, and you should be all set.blog comments powered by Disqus