I’ve struggled with this error for ~2 days. I’m trying to deploy a django app for the first time. The things which fixed the issue are as follows-
ALLOWED_HOSTS = [‘www.yoursite.com’]
On google domain page-
yoursite.com A ttl ip
www.yoursite.com CNAME ttl mysite-4uf8.onrender.com.
Follow this tutorial- Custom Domains | Render · Cloud Hosting for Developers
Hope it helps some.
A 400 Bad Request with a Django application usually points to an
ALLOWED_HOSTS configuration issue, as you mentioned. However, It’s hard to help without specific details.
Please could you share some specific details of the issue you are experiencing that may help us troubleshoot it with you, e.g. the actual custom domain, URLs where you see the error, etc.
If you don’t want to share these details on the community forum, please feel free to raise a ticket from the “Help” or “Contact Support” links while logged into the Dashboard.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.