Login issue with www.example.com and example.com

Hi,

I’ve set up the discourse platform using the one-click installation over at digital ocean and noticed that I am able to login as two different users within the same browser session.

I.e. When I go to my site like so: www.example.com and I login, then open up another tab and browse to my site via: example.com, it shows me as logged out and allows me to login with another account.

So, effectively, can login with two different accounts on the same browser, made distinct by whether I prefix with the www or not.

Is this normal behavior? I must admit, I don’t remember coming across this kind of thing on any other website. Is there a setting that I have not got configured properly?

Thanks guys

1 Like

Your site is available on two domains, you need to redirect domain.com to www.domain.com via your DNS settings. It is a very bad idea to allow a site to be accessible via two different names.

2 Likes