Can we access domain name within the build phases?

I would like to know whether there is a way to access the domain URL where the site build is getting deployed in any of the build phases(apart from reading it from the netlify config file)?

Hey @bravokeyl there are a number of ENV variables in the build system

Here is a comprehensive list

Sounds like you are looking for DEPLOY_URL, DEPLOY_PRIME_URL, or URL

Yes! Exactly what Iā€™m looking for.

1 Like