Subdomain rewrite to other domain


I’m unable to configure subdomain to rewrite to, is the path/to/page a problem or what is it?

In the Netlify DNS I’ve added a CNAME called subdomain with value but it doesn’t seem to work?



You can’t include a path in a CNAME. A CNAME is only for domain (and subdomain) names.

You could, however, have a Netlify _redirects file on your (and a placeholder index.html, perhaps) as a manually deployed site and do a 301 redirect.

Thanks that explains @danielfdickinson1, that was my backup solution indeed but I tried a “cleaner” way using the Netlify DNS. I didn’t know a path wasn’t possible.

1 Like

Hmm I’m unable to get it to work this way. It works on the domain but not on the custom domain and the configuration is correct. I have more subdomains working like this with a branch deploy but this is the only one with a _redirects file and that one doesn’t work as expected.

It just can’t find the website. And yes, it has an index.html file.

my _redirects file:

/* 301!

Alright it seemed to be a caching problem.

1 Like