Question: I am using django. I have hosted xyz.com. As part of the same website, I have abc.xyz.com

Now I want abc.xyz.com to read session information from xyz.com, so I can treat logged in users accordingly.

I have read answers which suggest putting -

```
SESSION_COOKIE_DOMAIN = ".xyz.com"

```

or 

```
SESSION_COOKIE_DOMAIN = "xyz.com"

```

But none of them work. How do I solve this?

PS: I am using nginx to point requests onto abc.xyz.com to xyz.com/abc

Answer: 
```
SESSION_COOKIE_DOMAIN = ".xyz.com"

```

works fine.
According to me,

```
SESSION_COOKIE_DOMAIN = "xyz.com"
SESSION_COOKIE_NAME = "examplesessionid"

```

should do the trick. This should be added to both the installations.

If still it does not work, I guess the `SECRET_KEY` should be same. Because, Django signs the cookie data using it. This would be a workaround.

However, session sharing is probably not a good idea. If you want single-sign-on, look at something like django-cas, which allows you to have 2 separate sessions, but the user will only log in once.