Forums

ALLOWED_HOSTS not working with username

Hi Guys,

So I have my own domain for my app, www.orbitalpredictor.com, which is working fine. But when I go to turn off debugging, and set the allowed host to my <username>.pythonanywhere.com, it gives me a bad request error.

Here's my settings.py:

ALLOWED_HOSTS = ['orbitalpredictor.pythonanywhere.com']

Could this be caused by my username being the same as my domain name?

Thanks

Shane

If you hit your webapp from www.orbitalpredictor.com, you need to have that in ALLOWED_HOSTS. It has nothing to do with your username being similar to you domain name.