• Hi,
    I have a main site at http://www.iosbasics.com. Now I want to create a sub-domain with url http://www.answers.iosbasics.com so that users of my main website can raise specific queries there and get answered.
    I want that my users don’t have to login again at the subdomain if they are already logged into my main website (SSO). In other words, I want to share the same set of users across all sub-domains
    Please advice what is the best way to go for this. I was going through WP Multisite documents but didn’t get much help.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Use the Multisite User Management plugin which allows you to set a role for new users on all sites on the network..but you don’t need this plugin to ensure they stay logged in across sub domains ..they already are by default and are “pseudo subscribers” to each site on the network which means they can comment and are already logged in.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    I want that my users don’t have to login again at the subdomain if they are already logged into my main website (SSO). In other words, I want to share the same set of users across all sub-domains

    That isn’t going to work right, due to browser security. They’ll have to log in per site many times :/ The same ID/Pwd combo will work, but shared sign-on may get tetchy.

    Mika,

    I have heard this said plenty of times but honestly I never once had that issue. Is that because im Super Admin (having a duh moment lol) I am able to go to main site then to subsite and automatically see that im logged in.

    Mike

    sorry this got posted twice with some 502 bad gateway message….

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Yeah we’re having silly server days 🙂 It’s upgrade day.

    I should phrase myself better though. “Users MAY have to sign on multiple times, depending on the security of your server and their browsers. Subdomains often work, but sometimes don’t. Mapped domains nearly never work.”

    Oh ok..glad it just wasn’t my computer or network ….and ok that makes more sense…I totally agree mapped domains wouldn’t work but so far I have been lucky to have subdomains work without issue. being able to comment on any blog in the network without having to log in each time so that is good!

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    I’ve had it fail about as often as I’ve had www/non-www redirects go stupid 🙂

    Oh! You MUST have your main domain be http://domain.com (no www) for this one. That’s one of the gotchas.

    OH yup you are right..I dont use “www” and have been told by others to never use www on a wordpress blog….i thought it was a rule (shrugs shoulders) 🙂

    Mike – That used to be a rule with WPMU, before it was merged into WordPress core at 3.0.

    If you are just trying to get logins to work across subdomains, I believe WordPress Multisite does that automatically when set up as a subdomain install (at least, all of mine do).

    If you are actually trying to get cookies to work across separate WordPress installs, that can still work, but it won’t happen automatically. You’ll have to set the COOKIE_DOMAIN constant in your wp-config.php file (you’ll want to set it to something like ‘.domain.com’ – notice the dot before the root domain name).

    If you’re trying to get cookies to work across top-level domains, there’s no simple way to do so.

    Awesome! Yes that is what I thought to in regards all my sub domains working in that manner successfully 🙂

    Most of the topics I have read about this cover MultiSite installs of WP.
    I have a different scenario, where I have one hub site and a number of sub-domains that I want users to not have to log in to.

    All sites are ‘private’ to logged in users only.

    I would want to replicate all users across the sites (based on the main site users.

    the Subdomains are all ecommerce (woo) sites.

    Can anyone point me towards a solution?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    ajamm – Please make your own topic. It’s not the same as this.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Single Sign On for Subdomain’ is closed to new replies.