Preview Builds on Custom Domains

Hi People

I am currently doing some testing to see if I could setup preview deploys under custom domain. This is required because the app that my work develops has strict CORS rules so it would be bad (in dev maybe not too bad) to have URL’s that had to be whitelisted based on a domain we don’t own, i.e. I don’t want to add to our CORS list as other developers can make their sites on this domain.

Is there any way to configure preview deploys to be done against a domain I control?

Hey @falconmick,
Branch deploys have the answers you seek:

Do you want to review that and see if it will work for you?

If you’re using Netlify DNS for DNS hosting, we’ll handle SSL for your branch automatically, but if you’re hosting DNS elsewhere with the custom domain pointing to your Netlify site, here are instructions for setting up SSL for the branch:

This is a manual process. It does not work to have a workable preview for each brancb.

Hey @danielo515,

Could you elaborate on your use case?

I want a deploy preview of each branch under my custom domain. so instead of xxx--preview.netlify.domain get for previews

If you use Netlify DNS, you could simply add DNS records for each branch via the API and thus, you can get it working without having to visit the UI.