Multisite login - stay logged in for all sites / site types

I have set up my multisite with completely different URLs (not subdomains).
Each site requires me to login separately (for editing pages). This is not very user friendly when trying to manage multiple sites from 1 dashboard.

For example - > Full Sitemap → Some site → Some page → Visit

Is it possible to stay logged in for all sites?

Maybe a feature in an upcoming version?

Other small issues:
If I add a page to one of the Site types it opens editmode of the draft (logged in) but in the Default Site type theme and settings (site name, url etc), not the Site type I added the page to.

I believe there is a cookie_domains config setting you might be able to set to include the domains you want, although it might only work for subdomains you can wildcard, not quite sure.

Hi,
I have same problem as @c5dragon. "I have set up my multisite with completely different URLs (not subdomains).
Each site requires me to login separately (for editing pages). This is not very user friendly when trying to manage multiple sites from 1 dashboard.

For example - > Full Sitemap → Some site → Some page → Visit".

So Is it possible to stay logged in for all sites when visiting from full sitemap @EvanCooper cookie_domains does not seems to work in this kind of scenario?

Let me double check on this.

It’s not going to work across domains because the session cookie used to authenticate you is bound to the domain. In fact, browsers are supposed to reject cookies for domains which are not the same as the server.

Multisite functionality is more designed to make it easier to manage multiple subdomains. When using across domains, then you should think of it as making devops easier. Each domain is still its own site to the users. If you had two sites set up with two individual installs, you would have to log into both, so it’s not any more difficult than that.

One thing you can do, however, is you can set up an edit domain where all of the sites exist as subdomains. This is different to the user-facing sites but would allow you to kind of achieve the same thing. It should also be locked down to a VPN or by IP address or something since it’s basically allowing a backdoor to all the sites.

So, you have site1 and site2, each with different domains. Set them up so they are working in multisite and set their canonical URLs. Then set up site1.example.com and site2.example.com on some other domain (or I guess you could pick on of the domains as the primary), and add those as additional domains to the sites. Then you as an admin could log in and share a cookie across the sites, but it can make caching a problem. For example, if you edit from site1.example.com it might get cached with that domain so visitors might get redirected to the edit domain.

I don’t think this always happens. We often use edit domains for sites we run for various reasons, none of which are do get around your specific request, but I think it could be done.

Other than that hack, that’s how cookies work. They stay with the domain and only get set for the one matching the server. That’s how WWW works.

1 Like