How to disable Django’s invalid HTTP_HOST error?

You shouldn’t be ignoring this error. Instead you should be denying the request before it reaches your Django backend. To deny requests with no HOST set you can use SetEnvIfNoCase Host .+ VALID_HOST Order Deny,Allow Deny from All Allow from env=VALID_HOST or force the match to a particular domain (example.com) SetEnvIfNoCase Host example\.com VALID_HOST Order … Read more

Invalid http_host header

The error log is straightforward. As it suggested,You need to add 198.211.99.20 to your ALLOWED_HOSTS setting. In your project settings.py file,set ALLOWED_HOSTS like this : ALLOWED_HOSTS = [‘198.211.99.20’, ‘localhost’, ‘127.0.0.1’] For further reading read from here.