Give warning when manually setting an environment variable that's reserved by Netlify

Hi Netlify,

Problem/Context for Feature Request:

I was deploying a nuxt site to netlify the other day which makes use of environment variables, including SITE_ID (you might see where this is going). My site uses the SITE_ID value to send an API request to my backend with the site id as a parameter during the build phase for static generation. The build succeeded, but the data being fetched by the API was missing for no apparent reason. After a while I realized the SITE_ID value I had set was being silently overwritten by Netlify to an unexpected string id, causing the API to fail as well.


Setting the environment variables through the “Build & Deploy” → “Environment” page is extremely easy, but it gives absolutely no warning when a variable you set conflicts with or has a special meaning to Netlify. It would be great if you gave an warning along the lines of “This environment variable name may conflict with Netlify’s reserved names. Please see [[Netlify environment var docs]].” Or in the case of read only environment variables like SITE_ID, it would be even better to not allow user’s to set them in the first place. I think it would avoid confusion in situations like mine.


this is an interesting suggestion, shaqb4! i will pass it on to the team!

Thanks! Hope it gets implemented at some point.

1 Like