Forums

Omitting "www" from my site's url points to the wrong place.

I bought a domain name from CrazyDomains.com.au and linked the CNAME to a PythonAnywhere webapp. It works fine when I type www.my-site.com into the url bar, but if I omit the "www" it links to a CrazyDomains holding page(Note: Chrome auto adds "www" if it was omitted, but FIrefox doesn't). I added an ALIAS for my-site.com and then spoke to a representative at CrazyDomains who showed me www.whatsmydns.net to confirm the CNAME and ALIAS were correct and pointing to the same IP address. From memory, after adding the ALIAS my-site.com redirected to PythonAnywhere's homepage?

I thought I might be able to fix it by setting up a second webapp for my-site.com and then redirecting to www.my-site.com. However, that involves making another CNAME for my-site.com and a CNAME cannot omit "www", so the new webapp now has the error message: "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."

tl;dr How do I configure my site so www.my-site.com and my-site.com point to the same PythonAnywhere webapp.

You need to set up the redirect from the naked domain (no www) to the www. domain at your domain host. There's more detail about that here: http://help.pythonanywhere.com/pages/NakedDomains/