I'm wanting to use EE2 for a SaaS product where account holders view their instance of the service through a subdomain. I'd like to take advantage of channels that combine similar structured content across all accounts, but have the subdomain help limit the content that is displayed to just that account.

So a structure like this:

  • my-ee-site.com/ -> Marketing site
  • my-ee-site.com/settings -> 404
  • account1.my-ee-site.com/ -> Account 1's publicly available content
  • account1.my-ee-site.com/settings -> Redirect to account specific login page [logged out] or account owner's settings page [logged in]

I'm considering an accounts channel with a user-editable subdomain mapped to a more permanent account id, that way I can attach more than one member to it. I was also thinking I could also attach this account id to all content during the content creation process so I could easily filter by it (i'd be using safecracker, not through the control panel).

Have you done this before? Are there other routes I should consider?

  • 2
    From personal experience I would strongly question whether EE is the right platform fro a SaaS app. Many of us have done it and paid for it down the road - While EE may seem flexible and have a lot to offer out of the box, in my opinion it's not a good choice for most SaaS applications. That said we don't know what you're application does so take this with a grain of salt. Nov 16, 2012 at 16:07
  • Marc, was there a correct answer to this question posted?
    – Anna_MediaGirl
    Dec 12, 2012 at 5:15

2 Answers 2


This is doable with EE (assuming you get thumbs up on the legal licence side of things).

You'll need to set up your domain so all (or most) subdomains resolve to a single location. You'll also need to configure apache to listen for traffic for all subdomains for your main domain.

Check out the following articles for details in performing this step: http://www.bybjorn.com/598/ http://net.tutsplus.com/tutorials/php/basecamp-style-subdomains-with-codeigniter/

I would probably write an extension that would check to make sure the subdomain is an valid account, and then add a bunch of global variables for use in templates.


You should probably check that your intended use is permitted under the EE license:


Unless you have been granted prior, written consent from EllisLab, Inc., you may not:

  • Use the Software as the basis of a hosted blogging service, or to provide hosting services to others.
  • Reproduce, distribute, or transfer the Software, or portions thereof, to any third party.
  • Sell, rent, lease, assign, or sublet the Software or portions thereof.
  • Grant rights to any other person. Use the Software in violation of any U.S. or international law or regulation.

I'd drop EllisLab quick line via their contact form to find out.

  • Thanks for the reminder, I will have to check with them on the first point. While I wasn't thinking anything like blogger.com, the lines are a little blurry about hosting services. Nov 16, 2012 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.