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

**URL:** https://meta.discourse.org/t/login-issue-with-www-example-com-and-example-com/43761
**Category:** Support
**Created:** [May 5, 2016, 10:03pm UTC](https://meta.discourse.org/t/login-issue-with-www-example-com-and-example-com/43761 "2016-05-05T22:03:51Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![fitspect](https://avatars.discourse-cdn.com/v4/letter/f/a9adbd/32.png) [@fitspect](https://meta.discourse.org/u/fitspect)
#### Post date: [May 5, 2016, 10:03pm UTC](https://meta.discourse.org/t/login-issue-with-www-example-com-and-example-com/43761/1 "2016-05-05T22:03:51Z")

</div>

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

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 5, 2016, 10:47pm UTC](https://meta.discourse.org/t/login-issue-with-www-example-com-and-example-com/43761/2 "2016-05-05T22:47:12Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [January 13, 2022, 3:34am UTC](https://meta.discourse.org/t/login-issue-with-www-example-com-and-example-com/43761/5 "2022-01-13T03:34:57Z")

</div>


