Answers.Body: <p>Thank you very much, Robin and Clive. </p>
  
  <p><strong>Note</strong>: I think there are better answers than what I have written here, such as <a href="https://craftcms.stackexchange.com/questions/10403/multi-site-multi-domain?noredirect=1&amp;lq=1">this</a> but they didn't appear to me after writing this.</p>
  
  <p>In case it might benefit anyone, it's clear there are many ways to do this. My setup does not use Craft's "multi-site" capabilities, but has three urls pointing to the same index.php. It functions more or less as follows:</p>
  
  <p><strong>Folder Structure</strong></p>
  
  <pre><code>craft/config/sitedata.php
  craft/templates/_genericPageTemplate.html
                 /mifc/_navigation.html
                      /local.css
                 /migr/_navigation.html
                      /local.css
                 /miwy/_navigation.html
                      /local.css
  public_html/index.php
  </code></pre>
  
  <p><strong>Main Page Template</strong> </p>
  
  <p>Now starts with:</p>
  
  <pre><code>{% set domain = craft.app.request.ServerName %}  
  {% set siteUrl = '//' ~ domain ~ '/' %}  
  {% set env = getenv('ENVIRONMENT') %}  
  {% set sitesData = craft.app.config.getConfigFromFile('sitedata')[env] %}  
  {% set siteData = sitesData[domain] %}  
  {% set categoriesToDisplay = siteData.nativeCategoryIds|merge(siteData.sharedCategoryIds) %}  
  </code></pre>
  
  <p>and later brings in the css and navigation depending on site:</p>
  
  <pre><code>&lt;link rel='stylesheet' id='localCss'  href='/{{siteData.handle}}/local.css' type='text/css' media='all' /&gt;
  ...
  {% include siteData.handle~'/_navigation.html' %}
  </code></pre>
  
  <p><strong>Config File</strong></p>
  
  <p>In <code>{% set sitesData = craft.app.config.getConfigFromFile('sitedata')[env] %}</code><br>
  the page template references <code>craft/config/sitedata.php</code> which contains stuff specific to each site, both for production and development:</p>
  
  <pre><code>&lt;?php
  
  /**
   * Return an array indexed by locale code
   */
  
  return [
     'production' =&gt; [
          'site1.org' =&gt; [
              'live'                  =&gt; true,
              'handle'                =&gt; 'mifc',
              'nameInMenus'           =&gt; 'Fort Collins',
              'siteTitleSuffix'       =&gt; 'Fort Collins Meditation &amp; Modern Buddhism',
              'url'                   =&gt; 'site1.org',
              'titleMainBig'          =&gt; 'Meditation &amp; Buddhism',
              'titleSmallerSecondLine'=&gt; 'Heruka Buddhist Center in Fort Collins and the Surrounding Areas',
              'topNativeCategoryIds'  =&gt; [194,195,220],
              'nativeCategoryIds'     =&gt; [194,198,10,11,14,196,7,1775,2476,5,4,9,6,8,267,2073,195,63,66,67,20,70,71,220,12,221,222,1688,223],
              'topSharedCategoryIds'  =&gt; [13,60],
              'sharedCategoryIds'     =&gt; [13,60],
          ],
          'site2.org' =&gt; [
              'live'                  =&gt; true,
              'handle'                =&gt; 'migr',
              'nameInMenus'           =&gt; 'Greeley',
              'url'                   =&gt; 'site2.org',
              'siteTitleSuffix'       =&gt; 'Greeley Meditation &amp; Modern Buddhism',
              'titleMainBig'          =&gt; 'Meditation &amp; Buddhism in Greeley',
              'titleSmallerSecondLine'=&gt; 'Heruka Buddhist Center in Greeley',
              'topNativeCategoryIds'  =&gt; [197],
              'nativeCategoryIds'     =&gt; [197,3112,58,61,2940,59,62,60],
              'topSharedCategoryIds'  =&gt; [198,67,13],
              'sharedCategoryIds'     =&gt; [198,10,11,14,67,13],
              'eventsCategoryIds'     =&gt; [60,198,10,11,14,67,13],
          ],
          'site3.org' =&gt; [
              'live'                  =&gt; true,
              'handle'                =&gt; 'miwy',
              'nameInMenus'           =&gt; 'Wyoming',
              'url'                   =&gt; 'site3.org',
              'siteTitleSuffix'       =&gt; 'Wyoming Meditation &amp; Modern Buddhism',
              'titleMainBig'          =&gt; 'Meditation &amp; Buddhism in Wyoming',
              'titleSmallerSecondLine'=&gt; 'Heruka Buddhist Center in Wyoming',
              'topNativeCategoryIds'  =&gt; [3151],
              'nativeCategoryIds'     =&gt; [3151,2969,65,64,68,69,72],
              'topSharedCategoryIds'  =&gt; [198,60,13],
              'sharedCategoryIds'     =&gt; [198,10,11,14,60,13],
              'eventsCategoryIds'     =&gt; [60,198,10,11,14,67,13],
          ],
      ],
      'dev' =&gt; [
          'f.dev' =&gt; [
              'live'                  =&gt; true,
              'handle'                =&gt; 'mifc',
              'nameInMenus'           =&gt; 'Fort Collins',
              'siteTitleSuffix'       =&gt; 'Fort Collins Meditation &amp; Modern Buddhism',
              'url'                   =&gt; 'f.dev',
              'titleMainBig'          =&gt; 'Meditation &amp; Buddhism',
              'titleSmallerSecondLine'=&gt; 'Heruka Buddhist Center in Fort Collins and the Surrounding Areas',
              'topNativeCategoryIds'  =&gt; [194,195,220],
              'nativeCategoryIds'     =&gt; [194,198,10,11,14,196,7,1775,2476,5,4,9,6,8,267,2073,195,63,66,67,20,70,71,220,12,221,222,1688,223],
              'topSharedCategoryIds'  =&gt; [13,60],
              'sharedCategoryIds'     =&gt; [13,60],
          ],
          'g.dev' =&gt; [
              'live'                  =&gt; true,
              'handle'                =&gt; 'migr',
              'nameInMenus'           =&gt; 'Greeley',
              'url'                   =&gt; 'g.dev',
              'siteTitleSuffix'       =&gt; 'Greeley Meditation &amp; Modern Buddhism',
              'titleMainBig'          =&gt; 'Meditation &amp; Buddhism in Greeley',
              'titleSmallerSecondLine'=&gt; 'Heruka Buddhist Center in Greeley',
              'topNativeCategoryIds'  =&gt; [197],
              'nativeCategoryIds'     =&gt; [197,3112,58,61,2940,59,62,60],
              'topSharedCategoryIds'  =&gt; [198,67,13],
              'sharedCategoryIds'     =&gt; [198,10,11,14,67,13],
              'eventsCategoryIds'     =&gt; [60,198,10,11,14,67,13],
          ],
          'w.dev' =&gt; [
              'live'                  =&gt; true,
              'handle'                =&gt; 'miwy',
              'nameInMenus'           =&gt; 'Wyoming',
              'url'                   =&gt; 'w.dev',
              'siteTitleSuffix'       =&gt; 'Wyoming Meditation &amp; Modern Buddhism',
              'titleMainBig'          =&gt; 'Meditation &amp; Buddhism in Wyoming',
              'titleSmallerSecondLine'=&gt; 'Heruka Buddhist Center in Wyoming',
              'topNativeCategoryIds'  =&gt; [3151],
              'nativeCategoryIds'     =&gt; [3151,2969,65,64,68,69,72],
              'topSharedCategoryIds'  =&gt; [198,60,13],
              'sharedCategoryIds'     =&gt; [198,10,11,14,60,13],
              'eventsCategoryIds'     =&gt; [60,198,10,11,14,67,13],
          ],
      ]
  ];
  </code></pre>
  
  <p>Feel free to point out any mistakes, etc, in this way of doing things.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-25T15:51:33.730Z
Answers.LastActivityDate: 2018-05-25T16:04:42.003Z
Answers.LastEditDate: 2018-05-25T16:04:42.003Z
Answers.UserDisplayName: kr37
Body: <p><strong>Usage Scenario</strong><br>
  One organization with branches in several cities. Most of the events in one city are only advertised to that one city, but some of the larger events in any given city will be advertised for the other cities. While the different branches are similar, some have many offerings (categories), and some just a few. </p>
  
  <p><strong>What we used to do</strong><br>
  In Craft 2, we had one single URL shared by all the cities, one large set of categories which mapped to the drop-down menus, and entries as events that fall into the categories.</p>
  
  <p><strong>What we want to do</strong><br>
  Individual URLs for the different cities, focusing on the offerings in that city, but a few from other cities. </p>
  
  <p><strong>Dilemma / Question</strong><br>
  Since we don't need multiple versions of the events entries, it seems that we need very little of the multi-site functionality. Just needing to call different templates with different navigation and css, depending on the request URL.<br>
  In<br>
  Settings > Sections > Events --> Site Settings<br>
  is it necessary to </p>
  
  <ul>
  <li>switch on all the light switches, and  </li>
  <li>check <em>Propagate entries across all enabled sites?</em></li>
  </ul>
  
  <p>It seems this might triple the size of the database.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-11T07:52:40.043Z
Comments.Text: What does this have to do with multi site? Do you want to have different languages or different sites? It seems one entry should just have different urls but this doesn't require multi site. You can just use Yii2 routing in order to load different asset bundles. You can include a custom behavior for those entries to fetch the url for each different available route and use your custom function instead of the `getUrl()` to link to those entries
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-11T08:24:27.543Z
Comments.Text: What he said. Multi-site sounds overkill. It sounds like you just need different subdomains and with a bit of template variation tested for using that. In Craft 2 you could do it using ```{% set domain = craft.request.getServerName() %}
  {% if domain starts with 'london' %}{% include '_incs/_londonNav' %}``` They'll be similar for Craft 3.
Comments.UserDisplayName: Clive Portman
Tags: <craft3><multi-site>
Title: Craft 3 multisite - best practice to minimize confusion and database size?
ThreadText: # Craft 3 multisite - best practice to minimize confusion and database size?
  
  (Asked by: username_0 on 2018-05-11)
  
  **Usage Scenario**  
  One organization with branches in several cities. Most of the events in one city are only advertised to that one city, but some of the larger events in any given city will be advertised for the other cities. While the different branches are similar, some have many offerings (categories), and some just a few.
  
  **What we used to do**  
  In Craft 2, we had one single URL shared by all the cities, one large set of categories which mapped to the drop-down menus, and entries as events that fall into the categories.
  
  **What we want to do**  
  Individual URLs for the different cities, focusing on the offerings in that city, but a few from other cities.
  
  **Dilemma / Question**  
  Since we don't need multiple versions of the events entries, it seems that we need very little of the multi-site functionality. Just needing to call different templates with different navigation and css, depending on the request URL.  
  In  
  Settings > Sections > Events --> Site Settings  
  is it necessary to
  
  * switch on all the light switches, and
  * check *Propagate entries across all enabled sites?*
  
  It seems this might triple the size of the database.
  
  **Tags:** craft3, multi-site
  
  > **Comments:**
  > **username_1**: What does this have to do with multi site? Do you want to have different languages or different sites? It seems one entry should just have different urls but this doesn't require multi site. You can just use Yii2 routing in order to load different asset bundles. You can include a custom behavior for those entries to fetch the url for each different available route and use your custom function instead of the `getUrl()` to link to those entries  
  > **username_2**: What he said. Multi-site sounds overkill. It sounds like you just need different subdomains and with a bit of template variation tested for using that. In Craft 2 you could do it using ```{% set domain = craft.request.getServerName() %} {% if domain starts with 'london' %}{% include '_incs/_londonNav' %}``` They'll be similar for Craft 3.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-05-25. Score: 1 | Accepted answer
  
  Thank you very much, username_1 and username_2.
  
  **Note**: I think there are better answers than what I have written here, such as [this](https://craftcms.stackexchange.com/questions/10403/multi-site-multi-domain?noredirect=1&lq=1) but they didn't appear to me after writing this.
  
  In case it might benefit anyone, it's clear there are many ways to do this. My setup does not use Craft's "multi-site" capabilities, but has three urls pointing to the same index.php. It functions more or less as follows:
  
  **Folder Structure**
  
  ```
  craft/config/sitedata.php
  craft/templates/_genericPageTemplate.html
                 /mifc/_navigation.html
                      /local.css
                 /migr/_navigation.html
                      /local.css
                 /miwy/_navigation.html
                      /local.css
  public_html/index.php
  
  ```
  
  **Main Page Template**
  
  Now starts with:
  
  ```
  {% set domain = craft.app.request.ServerName %}  
  {% set siteUrl = '//' ~ domain ~ '/' %}  
  {% set env = getenv('ENVIRONMENT') %}  
  {% set sitesData = craft.app.config.getConfigFromFile('sitedata')[env] %}  
  {% set siteData = sitesData[domain] %}  
  {% set categoriesToDisplay = siteData.nativeCategoryIds|merge(siteData.sharedCategoryIds) %}  
  
  ```
  
  and later brings in the css and navigation depending on site:
  
  ```
  <link rel='stylesheet' id='localCss'  href='/{{siteData.handle}}/local.css' type='text/css' media='all' />
  ...
  {% include siteData.handle~'/_navigation.html' %}
  
  ```
  
  **Config File**
  
  In `{% set sitesData = craft.app.config.getConfigFromFile('sitedata')[env] %}`  
  the page template references `craft/config/sitedata.php` which contains stuff specific to each site, both for production and development:
  
  ```
  <?php
  
  /**
   * Return an array indexed by locale code
   */
  
  return [
     'production' => [
          'site1.org' => [
              'live'                  => true,
              'handle'                => 'mifc',
              'nameInMenus'           => 'Fort Collins',
              'siteTitleSuffix'       => 'Fort Collins Meditation & Modern Buddhism',
              'url'                   => 'site1.org',
              'titleMainBig'          => 'Meditation & Buddhism',
              'titleSmallerSecondLine'=> 'Heruka Buddhist Center in Fort Collins and the Surrounding Areas',
              'topNativeCategoryIds'  => [194,195,220],
              'nativeCategoryIds'     => [194,198,10,11,14,196,7,1775,2476,5,4,9,6,8,267,2073,195,63,66,67,20,70,71,220,12,221,222,1688,223],
              'topSharedCategoryIds'  => [13,60],
              'sharedCategoryIds'     => [13,60],
          ],
          'site2.org' => [
              'live'                  => true,
              'handle'                => 'migr',
              'nameInMenus'           => 'Greeley',
              'url'                   => 'site2.org',
              'siteTitleSuffix'       => 'Greeley Meditation & Modern Buddhism',
              'titleMainBig'          => 'Meditation & Buddhism in Greeley',
              'titleSmallerSecondLine'=> 'Heruka Buddhist Center in Greeley',
              'topNativeCategoryIds'  => [197],
              'nativeCategoryIds'     => [197,3112,58,61,2940,59,62,60],
              'topSharedCategoryIds'  => [198,67,13],
              'sharedCategoryIds'     => [198,10,11,14,67,13],
              'eventsCategoryIds'     => [60,198,10,11,14,67,13],
          ],
          'site3.org' => [
              'live'                  => true,
              'handle'                => 'miwy',
              'nameInMenus'           => 'Wyoming',
              'url'                   => 'site3.org',
              'siteTitleSuffix'       => 'Wyoming Meditation & Modern Buddhism',
              'titleMainBig'          => 'Meditation & Buddhism in Wyoming',
              'titleSmallerSecondLine'=> 'Heruka Buddhist Center in Wyoming',
              'topNativeCategoryIds'  => [3151],
              'nativeCategoryIds'     => [3151,2969,65,64,68,69,72],
              'topSharedCategoryIds'  => [198,60,13],
              'sharedCategoryIds'     => [198,10,11,14,60,13],
              'eventsCategoryIds'     => [60,198,10,11,14,67,13],
          ],
      ],
      'dev' => [
          'f.dev' => [
              'live'                  => true,
              'handle'                => 'mifc',
              'nameInMenus'           => 'Fort Collins',
              'siteTitleSuffix'       => 'Fort Collins Meditation & Modern Buddhism',
              'url'                   => 'f.dev',
              'titleMainBig'          => 'Meditation & Buddhism',
              'titleSmallerSecondLine'=> 'Heruka Buddhist Center in Fort Collins and the Surrounding Areas',
              'topNativeCategoryIds'  => [194,195,220],
              'nativeCategoryIds'     => [194,198,10,11,14,196,7,1775,2476,5,4,9,6,8,267,2073,195,63,66,67,20,70,71,220,12,221,222,1688,223],
              'topSharedCategoryIds'  => [13,60],
              'sharedCategoryIds'     => [13,60],
          ],
          'g.dev' => [
              'live'                  => true,
              'handle'                => 'migr',
              'nameInMenus'           => 'Greeley',
              'url'                   => 'g.dev',
              'siteTitleSuffix'       => 'Greeley Meditation & Modern Buddhism',
              'titleMainBig'          => 'Meditation & Buddhism in Greeley',
              'titleSmallerSecondLine'=> 'Heruka Buddhist Center in Greeley',
              'topNativeCategoryIds'  => [197],
              'nativeCategoryIds'     => [197,3112,58,61,2940,59,62,60],
              'topSharedCategoryIds'  => [198,67,13],
              'sharedCategoryIds'     => [198,10,11,14,67,13],
              'eventsCategoryIds'     => [60,198,10,11,14,67,13],
          ],
          'w.dev' => [
              'live'                  => true,
              'handle'                => 'miwy',
              'nameInMenus'           => 'Wyoming',
              'url'                   => 'w.dev',
              'siteTitleSuffix'       => 'Wyoming Meditation & Modern Buddhism',
              'titleMainBig'          => 'Meditation & Buddhism in Wyoming',
              'titleSmallerSecondLine'=> 'Heruka Buddhist Center in Wyoming',
              'topNativeCategoryIds'  => [3151],
              'nativeCategoryIds'     => [3151,2969,65,64,68,69,72],
              'topSharedCategoryIds'  => [198,60,13],
              'sharedCategoryIds'     => [198,10,11,14,60,13],
              'eventsCategoryIds'     => [60,198,10,11,14,67,13],
          ],
      ]
  ];
  
  ```
  
  Feel free to point out any mistakes, etc, in this way of doing things.
  
  
  ---
  
  