Django Invalid HTTP_HOST header: 'localhost:10000'

I am having a numerous errors like this in my Django app:

django.core.exceptions.DisallowedHost: Invalid HTTP_HOST header: 'localhost:10000'

I am fairly certain it is rather new, although I didn’t change my Django settings. I’ve seen the two other posts about this error in this forum, but they seem to be fairly specific. I have a global question.

I think it is wrong to add ‘localhost’ to my ALLOWED_HOST. Why should I do that. Nothing in the documentation indicates such setting. (note, my Django app is not deployed with Docker). Isn’t any little mistake in Render request’s headers ? I should not have these errors, by default, right ?

Thanks a lot.

Hi there,

Can you please open a ticket directly with us from our dashboard using the Help menu. It would help us look further into this issue if we were able to see the service which is having this issue.


Render Support, UTC+10 :australia:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.