RENDER_EXTERNAL_HOSTNAME is set to url rather than my custom domain

Is this the expected behaviour?

I would have expected it to be set to be custom domain.

1 Like

Yes, this is expected. Here you can see the list of env vars and their expected values.

Is there a way to get the custom domain?

Hi @TedMeftah ,

Render services can have many custom domains, so we don’t specify it as an environment variable. The best way to detect this is to look at the Host header in the HTTP request, which will let you know which domain a request is meant for.

Would this approach work for you?