Remember when the Obama campaign's fundraising platform made headlines for handling $250 million in donations? That kind of performance wasn't magic—it was smart infrastructure. And the good news is, you can get similar speed for your own site without breaking the bank.
I've been running Jekyll sites for years, but there was always one annoying roadblock that kept me from using Amazon's S3 and CloudFront combo for hosting.
Here's the thing with Amazon S3 and CloudFront: they require a CNAME record. In plain English, that means you're stuck with addresses like blog.yourdomain.com or www.yourdomain.com.
Now, I realize this might sound petty, but having "www" in front of your domain feels outdated. It's like still writing "http://" in your business cards. If you're hosting on a root domain like yourdomain.com, traditional DNS records won't let you point directly to CloudFront. That was my dealbreaker—until I found a workaround.
ANAME is a special DNS record type that solves exactly this problem. Unlike standard DNS records, it lets you point your root domain directly to CloudFront without the www prefix.
For anyone serious about site performance, 👉 DNS Made Easy offers ANAME records that make root domain hosting on CDNs actually work. At $29.95 per year for up to 10 domains, it's a small price to pay for modern, fast hosting without looking like you're stuck in the 90s.
The setup is straightforward: create an ANAME record pointing to your CloudFront distribution, and your root domain will resolve properly. Now let's walk through the complete migration process.
Head over to the S3 console and create a new bucket. The name matters here—use your exact domain name: yourdomain.com.
You'll need to set permissions so CloudFront can access your content. The policy basically tells S3 to allow public read access to everything in the bucket.
In your bucket properties, turn on static website hosting. Set your index document to index.html and your error document to 404.html (or whatever error page you've created).
Make note of the website endpoint URL that S3 generates—it'll look something like yourdomain.com.s3-website-us-east-1.amazonaws.com. You'll need this in a minute.
CloudFront is Amazon's content delivery network. It caches your site across data centers worldwide, so visitors get faster load times no matter where they are.
Here's where people usually mess up: when you create a CloudFront distribution and see your S3 buckets in the dropdown menu, don't pick one of those options.
Instead, paste in that website endpoint URL from S3. This is crucial—using the bucket directly won't handle redirects and error pages properly.
Add both your root domain and www version as CNAMEs: yourdomain.com and www.yourdomain.com. Set your default root object to index.html.
After CloudFront creates your distribution (this takes about 15 minutes), grab the distribution domain name—something like d20l41xryjmszl.cloudfront.net. You'll need this for DNS configuration.
This is where 👉 DNS Made Easy's ANAME record capability becomes essential for professional site hosting. Create an ANAME record pointing to your CloudFront distribution domain (don't forget the trailing dot).
Set the TTL to 60 seconds while you're testing. Once everything's working smoothly, you can increase it for better DNS performance.
Before switching your registrar's nameservers, verify that your content is accessible through the CloudFront URL.
The standard version of s3cmd doesn't handle CloudFront cache invalidation well for static sites. Jose Prio created a fork that works perfectly for this setup:
git clone https://github.com/joseprio/s3cmd.git
cd s3cmd
sudo python setup.py install
Run s3cmd --configure and enter your AWS access key and secret key when prompted.
Make a simple shell script called publish.sh one level above your Jekyll site:
s3cmd sync --delete-removed --acl-public --reduced-redundancy --cf-invalidate _site/ s3://yourdomain.com/ --verbose
This command syncs your site, removes deleted files, sets proper permissions, uses cost-effective storage, and invalidates the CloudFront cache automatically.
Run sh publish.sh and watch your files upload. The first sync takes longer, but subsequent updates only transfer changed files.
Visit your CloudFront distribution URL directly to confirm your site loads correctly. Check a few different pages to make sure navigation works.
Once everything looks good, update your domain registrar to use DNS Made Easy's nameservers. DNS propagation typically takes a few hours, though it can be faster.
Your Jekyll site now lives on a global CDN with lightning-fast load times, you're using your clean root domain without www, and your entire hosting cost is likely under $5 per month (plus that $30 annual DNS fee).
The performance difference is noticeable. Pages load faster, especially for visitors far from your origin server. And you've got the same infrastructure approach that powers high-traffic sites—just scaled to your needs.