I’m using an external DNS for my Netlify site. I’m trying to point a subdomain to a branch deploy for my Netlify site with the following configuration:
- Netlify site name: apsis.netlify.app
- Branch subdomain: apsis–dev.netlify.app
- Custom domain: apsistech.io
-
CNAME
record (external DNS):dev.apsistech.io
→dev--apsis.netlify.app
What I tried
Without a domain alias (Domain management
→ Domains
→ Custom domains
) I get the following certificate error:
$ wget https://dev.apsistech.io/
ERROR: no certificate subject alternative name matches
requested host name ‘dev.apsistech.io’.
This error makes sense since the automatically-provisioned Let’s Encrypt certificate doesn’t include the dev.apsistech.io
subdomain.
So next, I added the domain alias dev.apsistech.io under Domain management
→ Domains
→ Custom domains
. The result this time is that the subdomain redirects to the apex domain instead of the branch subdomain.
- Expected redirection:
dev.apsistech,io
→dev--apsis.netlify.app
. - Actual redirection:
dev.apsistech,io
→apsis.netlify.app
.
Is there any way to configure this properly so that the subdomain redirects to Netlify’s branch subdomain?