Managing multiple domains

Article author
Josh Lopez
  • Updated

Using Memberstack 2.0? There is an updated version of this article here.

Using multiple domains and subdomains for a single userbase.

Can I use multiple domains?

Yes and no. Memberstack will work on an unlimited number of domains IF the domains point to the same content. The issues begin when a user logs into one domain, but travels to another domain in the same session. They would have to log in again to access members-only content on that "new" domain.

 

Can I use a subdomain?

Yes! We just recommend that members sign up and log in on whatever subdomain contains your members-only content. A session is specific to the domain. Memberstack.io and app.memberstack.io are a great example of this. You'll notice that the signup page appears to be on the main site, but is actually on the app.

 

FAQ:

If the user travels from sd1.website.com to sd2.website.com, they would have to log in once again, correct? Does this happen every time? What if their sd1 and sd2 sessions are stored in cookies after their first login on each subdomain?

 

The users would have to log in for each domain. Once they log in, their login is saved as a session. This session duration can be changed by adding some code. The default session duration is 72 hours. Here is the code to use to change it:

<!--MS session duration-->
<script>
ms_settings = { session: 72 //hours }
</script>

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.