I maintain a Python/Django web app where users can authenticate and log in. I've noticed that if I log into my app at example.com
, I'm still logged out at www.example.com
!
This behavior replicates on all major browsers (Firefox, Chrome, etc). It seems session information is not being maintained between these addresses? I'm perplexed. Why could this be happening?
My DNS name was procured from Azure. E.g. example.cloudapp.net
. I use a DNS management service called Hurricane Electric to map example.com
and www.example.com
to this DNS name. Specifically, in Hurricane Electric I've created CNAME records where the hostname is the azure-provided DNS name, and the name is the web address I want to associate with it (along with a TTL). That's about all I've done.
PROPOSED FIX: in my DNS management system, should I route www.example.com
to example.com
intead of example.cloudapp.net
?
Note: Explored whether this SO answer can solve my problem. It ostensibly does, but a known issue is losing all session information - and I do NOT want that.