Can new Netlify environment variables be used to define 404 page redirects without Netlify.toml?

Hello Netlify Community,

I hope this message finds you well. I’m a newbie who is using WP2Static to deploy my site, and I have a question about using the new Netlify environment variables. Can these variables be used to define redirects for a 404 page, even if I am unable to include a Netlify.toml file in my build?

I appreciate the support and service I have received from Netlify, even on their free plan. I look forward to hearing from you.

Thank you

@mrsuccessful-cyber I’m not sure what you mean by “new Netlify environment variables”, are you able to point to the documentation, forum/blog post or announcement for the feature you’re referring to?

If you wanted to use a single custom 404 page for everything, you could have one called 404.html in the root of the deployment as per:

Alternatively you would set up redirects via either a netlify.toml or _redirects file.

All of them would require you to add a file or otherwise customise your build/deployment.

@mrsuccessful-cyber Environment variables themselves aren’t a completely new piece of functionality, I suspect it’s just the UI that may have changed, in particular the Specific scopes feature that mentions requiring a plan upgrade to unlock.

I’m unaware of anything about how the environment variables work that would let you use them to adjust redirect behavior.