Wildcard Domain in YAML

Can somebody please confirm how you specify a wildcard domain in your render.yaml? The asterisk is invalid YAML syntax *.mydomain.com and simply putting .mydomain.com doesn’t fit Render’s domain regex that checks the YAML. For reference, that regex appears to be limited to either conventional subdomains or apex domains:

^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*$

Cheers
Will

Hey, thanks for sending this over. We noticed this is actually a bug in our regex, and we’ll be pushing out a fix shortly. Thanks again!

Was the REGEX fixed for this? — I’m hitting this too when using .domain.com in the YAML file.

Hello! I don’t believe .domain.com will work. Instead, I believe you need to use *.domain.com. If you’re still having issues after including the wildcard, please let us know.

Hi Danielle, when I use *.domain.com I get the error “did not find expected alphabetic or numeric character” when the YAML file syncs.

Hey Chris. Using a * in YAML requires surrounding quotes. Can you try using "*.domain.com" instead?

1 Like

Thanks Jake! That did it! :slight_smile: I forgot the old rule… it’s either DNS… indentation… or quotes!

2 Likes