Jump to:

10993 Posts in 2727 Topics by 1818 members

All other Modules

SilverStripe Forums » All other Modules » Configuring domains for the Subsites module

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1394 Views
  • kat1
    Community Member
    1 Post

    Configuring domains for the Subsites module Link to this post

    I'm evaluating Silverstripe for projects that need multiple sites to be managed from the same CMS.

    I've installed V2.3 and the Subsites module and set up a second site and everything looks really good in admin.

    However I'm struggling to reach my newly created subsite which seems to have been given the url:


    Presumably I need to add something to my etc/hosts file to make this site visable at the suggested URL. Anyone know what I need to do?

    Secondly, and more importantly to me, how do I configure additional sites to operate on totally separate URLs?

    For example: www.firstsite.com, www.secondsite.com etc.

    It looks as if the construcion of the url shown in the Silverstripe admin might make this impossible.

    Can someone clarify what the possible options are and how they might be implemented?

    Many thanks.

  • Sam
    679 Posts

    Re: Configuring domains for the Subsites module Link to this post

    Hi kat1,

    You want to use the Subsite::set_allowed_domains() in _config.php

    Here's an example:


    This will let you create subsites such as "wellington.yoursite.com". However, because org.nz, co.nz, etc are also listed, you could create 'somethingcompletelydifferent.org.nz'.

    Note that you shouldn't include "www." in any of the site names - if you subsite is called 'wellington.yoursite.com' then 'www.wellington.yoursite.com' will also work too.

  • Sam
    679 Posts
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.