Custom domain 400 Bad request

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-

Inside, settings.py-
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.

Hi,

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.

Alan

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