Forums

Django/CNAME issue

information:

Custom Domain registered through google domains
Custom Resource Records:
#1-Name: @, Type: A, TTL, 1h, DATA: 34.XXX.XXX.XXX
#2-Name: www, Type: CNAME, TTL: 1h, DATA: webapp-XXXXXX.pythonanywhere.com.

on the web app tab of pythonanywhere, if I make the configuration "www.domainname.com", the DNS setup section checks out without error but the "It worked!" standard django page does not load for either www.domainname.com or domainname.com.

on the web app tab of pythonanywhere, if I make the configuration "domainname.com", the DNS setup section gives the error "You do not have a CNAME set up for your domain. Check this help page for more information about how to set it up correctly" but the "It worked!" standard django page comes up for domainname.com but NOT www.domainname.com.

It seems really odd that I get the CNAME error, but half still works. Obviously I'd like to have it show no CNAME error and work for www.domainname.com as well as domainname.com.

Anyone crossed this bridge?

You can't (usually) use CNAMEs for "naked" domains (without the www.). More info here: https://www.pythonanywhere.com/wiki/NakedDomains

re: why the "it worked" screen isn't showing up for www., could it be to do with the ALLOWED_HOSTS setting?

does not work at all ...xcudák h

That's not much to go on. Have you read the documentation? What have you tried? What was the result.