Icon

Building custom domains

Author imagePublished on Mar 12, 2025 by

Levi

People have been asking for custom domains with Smmall Cloud. I’d previously done custom domains for Wunderbucket and wasn’t happy with the implementation so I revisited my options for Smmall Cloud.

Custom domains as a pure AWS implementation

Custom domains are trickier on AWS than you might expect. CloudFront and AWS SSL certificates have limits on the number of domains for which they will issue certificates, and every time you add a new domain, you need to redeploy the CloudFront instance—a process that can be very slow. Because of this, I needed to look at other options.

I previously built custom domains using the following flow:

  1. Let’s Encrypt SSL certificates for domains
  2. A node.js proxy server using http-proxy that worked like this:
    1. If a request came in for a domain that didn’t have a ssl certificate the proxy server would make a request to Let’s Encrypt to issue a certificate
    2. Let’s Encrypt would validate the domain and issue the certificate
    3. The proxy would store the SSL cert in Dynamo with the expiration date attached as a TTL attribute.
    4. It would then encrypt the requests with the stored certificate and proxy them to the correct static site in S3
  3. I assigned this proxy server a global static IP address using the AWS Accelerator so users could point their A-Records at Wunderbucket. I also gave it a domain for CNAME records.

This flow worked well but it was a lot to maintain just to support custom domains with SSL. AWS Accelerators and running the proxy servers with ECS and ELB were expensive. I was paying $100/mo for this one feature. That’s a decent chunk of spend for a tiny app.

To me the overhead of maintenance and the cost ruled this approach out for Smmall Cloud.

Solution: Custom domains on Vercel

The Smmall Cloud frontend runs on Vercel, which essentially does what I needed. It quickly issues SSL certificates and supports an unlimited number of custom domains.

Instead of writing my own proxy server to issue SSL certificates and resolving the DNS on my own, I could use the Vercel APIs to add secure domains and then just do the resolution in my web app. This took custom domains to hundreds of lines of code running a complex interdependent group of services, to just a few lines of code.

Ask about our custom domains

The reason custom domains are an important feature for Smmall Cloud goes right to the heart of our mission: putting your brand front and center.

Today the custom domains feature is in beta. If you’d like to try it out with your files, get in touch.

Happy sharing!

A Smmall Project