Host a site in a subdomain / Branch deploys as a whole independent site?

Hello!

I need to host a site in a subdomain (newlocation.company.com) and I just read about branch deploys (my main domain is already on Netlify, using Netlify DNSs). My question is, can branch deploys work as a whole site? Because that’s actually what I need, not a subsidiary of the main domain (company.com) for testing purpuses or whatever: I need a totally independent site in the subdomain.

Thanks!

Yeah, it can be anything. Any code that you deploy as a separate branch will act as a branch-deploy.

1 Like

I mean, I currently have company.tld on Netlify coming from master branch. Now, I need to create a site in whatever.company.tld, but I guess is not possible to create directly a new site from Git in that subdomain as company.tld is already on Netlify (or is it?) so I thought of adding it via a branch deploy, is that the way to go? Hope you get the idea.

My bad: it’s actually possible to add a new site from Git to a subdomain, even if the main domain (a custom domain) is already on Netlify. No need branch deploys to do that: these are not intended for that.

*Note: What happened to me here is that I forgot I already added the target subdomain to a CNAME record, that’s why Netlify was alerting me “domain is already on Netlify” when I tried to create the new site.

3 Likes

Hey there, @javier :wave:

Thank you so much for coming back and sharing those details! This will be beneficial to future Forums members who encounter something similar. :netliconfetti:

1 Like