DisallowedHost at / Invalid HTTP_HOST header

Hi there, I’m having a Django issue specific to the new Free plans. After deploying I’m receiving this error:

# DisallowedHost at /

Invalid HTTP_HOST header: 'srv-c63h5ond17cdcpbc7c90-kn.usr-c25iskjs1xxxxxxxxx.onrender.com'. You may need to add 'srv-c63h5ond17cdcpbc7c90-kn.usr-c25iskjs1xxxxxxxxx.onrender.com' to ALLOWED_HOSTS.

If I add these entries to the Django settings.py Allowed Hosts, the site loads. Is there a way to programatically grab these entries or a way to avoid this?

Note this does not happen to me on the “starter” plan.

Thanks!

Hey @jaykay, responded on your email to support. We’re on it :slight_smile:

Thanks, just replied.

1 Like

Can you also tell me about this. I am also getting the same error.

Hi,

This is a pretty old topic. However, the solution appears to be in the error message:

You may need to add ... to ALLOWED_HOSTS

https://docs.djangoproject.com/en/5.0/ref/settings/#allowed-hosts

If you still require assistance please open a new topic or raise a ticket from the “Help” link while logged into your Render dashboard.

I’m going to close this topic due to its age.

Alan