Minor bug discovered when investigating Branch subdomains not working after I changed deploy repository When you have a subdomain linked, then change your repository linked to the Netlify site the subdomain will remain attached to your site.
This doesn’t feel intentional, if you then have a branch with the same name, set that up in branch deploys, and then deploy the branch, it will overwrite the subdomain with new content. However, I wanted to raise this as it feel like best practice would be to remove that subdomain when repository is changed, or ask if you would like them removed.
Steps to reproduce
- Create site with a branch deploy set as a subdomain
- Change repository for that site
- View subdomain still exists for old repo
Subdomains removed when repository is changed.
Can you submit a pull request?
I wanted to investigate but don’t think this part of Netlify is open source? I’d attempt to dive in if it is!