Forums

Invalid HTTP_HOST header: 'autotest.pythonanywhere.com'. You may need to add u'autotest.pythonanywhere.com' to ALLOWED_HOSTS

I am getting error:

Bad Request (400)

because of:

Invalid HTTP_HOST header: 'autotest.pythonanywhere.com'. You may need to add u'autotest.pythonanywhere.com' to ALLOWED_HOSTS

with my allowed_hosts like

ALLOWED_HOSTS = [u"autotests.pythonanywhere.com",]

Where can be a problem?

You've got an extra "s" in the ALLOWED_HOSTS -- it should be autotest.pythonanywhere.com, not autotests.pythonanywhere.com