Is it possible to set the domain via regex or pattern

i have an app that i want to have a web interface at abc.client1.mysite.com and an api at api.client1.mysite.com, since the domain is dynamic i thought i could configure that by using *.mysite.com and api.*.mysite.com as site domains respectively.

When using *.mysite.com works but api.*.mysite.com doesnt. Help would be appreciated.

Use of wildcards in hostnames are subject to RFC 6125 §6.4.3. Only left-side labels can have them. Issuance of wildcard TLS certificates follows this pattern, so Caddy conforms to that as well. You’ll probably have to elaborate. The “DNS-proper” way of doing what you want to do would be more like *.api.yoursite.com instead of the other way around.

3 Likes

Thanks for the swift reply. i managed to get that working.

1 Like

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