Generating subdomains with caddy

Hi, i was wondering if Caddy is a good candidate for this use case:

I would like to give the ability for users on my website to generate subdomains, abc.com, for example user mark, will get mark.abc.com. Similar to artstation.com which has a portfolio builder.

Would creating a script to append to the caddy file each time a website is created by a user work? I have never built a website builder before so would appreciate any advice on what route to take.

Caddy can issue a wildcard cert *.example.com for your domain, if you build Caddy with the appropriate DNS plugin for your DNS provider, to solve the ACME DNS challenge. Then you can just proxy all requests to that wildcard domain to your backend and have your backend read the subdomain to identify which user it’s for.

This topic was automatically closed after 30 days. New replies are no longer allowed.