duksta.org

adventures in electronics, infosec and life

Hosting Apex Domain in S3 Without Route 53

For many years, I’ve eschewed using www for my website. I’ve always redirected requests for www.duksta.org to duksta.org. Now that I’ve moved to S3, I’ve had to change that stance as you can’t have a CNAME record for your apex domain and the ANAME record is an ugly hack that’s not RFC compliant. I could sign up for Route 53 DNS service, but I don’t really need the global redundancy that Route 53 provides, nor do I want to pay for DNS service. Yeah, I’m cheap like that.

Instead of using S3’s recently released apex domain support, I’m instead putting my site behind CloudFlare. In CloudFlare, I have configured a Page Rule to redirect all requests from duksta.org/* to www.duksta.org/$1. Since I maintained my site structure in the move to Octopress/Jekyll, this has the added bonus of redirecting anyone’s old bookmarks to the right place.

CloudFlare Page Rule Config

Yes, I’m not truly hosting my apex domain in S3 like this, but rather redirecting it to www with CloudFlare, but it gets the job done for what I need.