Django app can't be reached when www. is in front of the domain

The issue I’m running into is pretty odd. I’ve reached out to my domain provider, and they have verified all the DNS records as accurate. For some reason i can reach my website with mysite.com, but NOT with www.mysite.com. In my django settings I have the www version in both allowed hosts and csrf trusted. Also, another thing to make me think it’s not the django build/settings, is that Debug is set to True (and works), but when I add the www. it doesn’t go to a debug screen, it simply can’t be reached. Any ideas?

Hi @champlooSIXSIX

You need to add a certificate for www.mysite.com in addition to mysite.com.

You’re referring to the DNS? I’ve done this already as stated in my original post.

No, I mean you need to issue a certificate for www.mysite.com:

$ fly certs add www.mysite.com

Your app (if I’m looking at the right one) has a certificate for mysite.com, but not for www.mysite.com.

There is a bit more info on how to use a custom domain: Use a custom domain · Fly Docs

I must have over looked this, thank you so much!

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