How to support unlimited custom domains for multi-tenant SaaS without a Load Balancer (AWS/GCP/Cloud Run/Render)?
20:44 25 Jan 2026

I’m exploring how multi-tenant SaaS platforms (like Medium/Hashnode) handle custom domains.

Assume my application already supports multi-tenancy at the code level:

  • Identify tenant using the Host header

  • Map Host → tenant in DB

  • Serve tenant-specific data/content

Now the infrastructure question:

Users will point their domains to my app using:

  • A record → my IP, or

  • CNAME → my endpoint

How can a single server/app accept requests from N number of custom domains without using a Load Balancer?

I know these common approaches:

  1. Use a Load Balancer (but adds fixed monthly cost + traffic charges)

  2. Use a Linux VM with Nginx reverse proxy (works, but then scaling/SSL becomes tricky)

I’ve also seen Cloudflare Tunnel, but I want to avoid it due to potential extra latency.

Platforms I’m evaluating:

  • AWS Amplify

  • DigitalOcean App Platform

  • GCP Cloud Run

  • Render

linux amazon-web-services multi-tenant saas wildcard-mapping