The Core Dump

Cyber is hard

[By Nic Lindh on Sunday, 08 March 2015]

Naked root domain with Amazon S3 without using Route 53

How to host a static site on Amazon S3 with an apex domain without using Amazon’s Route 53.

This took me way too long to figure out, so I hope this post will save you some time.

If you’re the kind of cool cat who uses a static site generator like Jekyll for your site you’re probably also the kind of cool person who wants to put your static site on Amazon’s S3 so you don’t have to worry about a traffic spike taking your site down or your site getting hacked.

But if you’re like me you also want the site to use the apex domain, a.k.a. root domain, a.k.a. naked domain, that is, the site itself like thecoredump.org instead of www.thecoredump.org.

Cough hipster cough.

For technical reasons based in the history of the DNS system and how S3 (and platforms like Heroku) works, this is surprisingly difficult.

Amazon, not being idiots, have solved this problem with their Route 53 DNS service. But what if you don’t want to use Route 53?

It looks grim, since Route 53 have figured out what is essentially a hack of the DNS system and one that’s mostly of use to them. Why would anybody else support this?

From a technical standpoint the issue is that the domain name system expects the naked domain, or if you want to use the technical term, the apex domain (which sounds like a pretty cool band name) to be set up to resolve to an IP address but Amazon’s S3 (and Heroku) does its own domain name resolution so there is no IP address to resolve to.

Bother.

But more and more domain name hosts are figuring out how to replicate this feat, and the one I recommend is Cloudflare. If you put your domain behind Cloudflare (which I’ve been doing for years for the Content Delivery Network functionality and the hack protection they provide), they support what they call CNAME flattening, which means they support naked domains for things like Amazon S3 and Heroku. Which is awesome. And free.

Incidentally, as I said, I’ve used Cloudflare for years and am continually amazed that their base level service is free. Seriously? A free CDN? That’s very cool but kind of nutty.

So why not just use Route 53? This goes into a much bigger post about Amazon Web Services. A lot of companies are building their businesses on top of AWS and are very happy with it, but the thing with AWS is that it’s incredibly flexible and that flexibility inevitably leads to complexity. AWS has a massive learning curve.

S3 is sort of an outlier in the AWS eco system in that it’s very straightforward: You create a bucket, you put files in the bucket, people can see the files. Boom. Simple. The rest of the AWS system is very much not so simple, including Route 53.

Route 53 lets you do all kinds of very cool things with the DNS system, but if all you want to do is put up a simple static site for your business you’ll get a headache real quick.

Cloudflare keeps it simple.

It’s so great you can put your static site on S3 and have an apex domain point to it and not have to worry about any kind of server maintenance and upkeep. It’s very future.

« The Cars: Let’s Go

 »


You like to read about technology? What a coincidence—I like to write about technology!

What to expect when you’re expecting a Hackintosh

There is unrest in the Mac community about Apple’s commitment to the platform. Some are turning their eyes to building a Hackintosh to get the kind of computer Apple doesn’t provide. Here’s what it’s like to run a Hackintosh.

The car is going digital and that’s a good thing

Car nerds are dealing with some cognitive dissonance as car technology changes.

Review: Kindle Oasis

The Oasis is Amazon’s best e-ink reader to date, but it’s not good enough for the price.

“Tea, Earl Grey, hot”

Nic buys an Amazon Echo and is indubitably happy with the fantasy star ship in his head.

It’s a content blocker, not an ad blocker

The problem isn’t ads. The problem is being stalked like an animal across the internet.

Review: Synology DS416j

The DS416j is a nice NAS for light home use. Just don’t expect raw power.

(Nerd Note) Moving to GitHub Pages

The Core Dump is moving to GitHub Pages. This is a good thing, most likely.

Apple Watch, six months in

Thoughts on Apple Watch after half a year of daily usage.

Magical thinking about encryption and privacy

Predictably, the Paris attacks brought the anti-encryption crowd back out of the woodwork. They're at best being willfully disingenuous.

Building a static site for an investigative journalism project

Things to consider when planning to build a site on a compressed time table.

Digital hygiene for online security and safety

Nic provides some basic not-too-paranoid tips for securing your digital life.

How to install Jekyll on Amazon Linux

Installing Jekyll on an EC2 Amazon Linux AMI is easy. Here are the steps.

Will Apple Watch be a success?

After wearing the watch for over a month, Nic has thoughts on its future. Spoiler: Depends on how you define success.

Let’s all chill out about the iPad sales numbers

Turns out “it's just a big iPhone” is a stroke of genius.

Tech terms you might be misusing

Some technical terms still confuse people who should know better, like journalists.

Naked root domain with Amazon S3 without using Route 53

How to host a static site on Amazon S3 with an apex domain without using Amazon’s Route 53.

New technology requires new thinking

People fear change, so new technology is used as as a faster version of the old. This makes technologists sad.

An HTML, CSS and JavaScript lesson plan

Nic provides a lesson plan for teaching total beginners HTML, CSS and JavaScript.

The glanceable wrist in your future

Nic loves his Pebble and looks forward to the Apple Watch, but realizes he’s in the minority.

It's the words, stupid

Nic loves books, but he loves their content more.

Our technology is bad and we should feel bad

Nic is worried about the fragile state of our technology and thinks you should be as well.

The WATCH is nigh, and I don't get it

Nic tries to understand the WATCH. It doesn't go well.

Apple might enter the home integration field

Nic thinks home integration could be Apple’s next major category. Read on to find out why.

An Apple ebook reader would be nice

Nic is frustrated with his Kindle and would love to see Apple make an e-ink reader.

The iPhone, devourer of technologies

The iPhone was announced Jan. 9, 2007. It now occupies a huge chunk of Nic’s life.

The A7 processor is your friend

Nic is very impressed with the speed of the iPhone 5S and iPad Air.

The 2013 Nexus 7

Nic buys a Nexus 7 to test the Android waters.

On azcentral.com outsourcing comments to Facebook

Nic outlines some of the risks of ceding comments on news stories to Facebook.

Lion and the angst of the greybeards

Nic is bemused by the sturm und drang surrounding the iOS-ification of Mac OS X.

Web publishing made easy

Web publishing used to require heavy-duty nerditry, but no longer.

How to create an e-book

Nic is creating an e-book. He shares what he’s learned so far.