How to do custom domains for your users?

I have a custom domain configured for myself and my users can get their own subdomains using wildcards.

Now I’m struggling to give them their own custom domain.

Do we really have to give our users the A and AAAA records of our app? That seems wrong.

It feels like there has to be a way to achieve it via CNAME or via normal name servers …

Hi @jan-hesters

Unfortunately due to how DNS works, you can’t have a CNAME on the root of a domain name (e.g. example.com can’t have a CNAME but www.example.com can).

So if you tell your customers to use www.theirdomain.com instead of theirdomain.com you can achieve it through CNAME-only but that’s not a great experience.

Some DNS providers offer a feature called CNAME flattening which allows CNAME on the root of a domain by essentially doing a lookup and converting it to an A record whenever a lookup is done on the root.

Take a look at this Cloudfare blog post for more info Introducing CNAME Flattening: RFC-Compliant CNAMEs at a Domain’s Root (cloudflare.com)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.