<p>You can also check out the free video on it here: <a href="https://mijingo.com/lessons/craft-3-multi-site/" rel="nofollow noreferrer">Using Craft CMS 3 Multi-site</a></p>

<p>Multi-site has changed as of Craft 3 RC11. It now requires much less config outside of the control panel. <a href="https://docs.craftcms.com/v3/sites.html" rel="nofollow noreferrer">See the official docs on Sites in Craft 3.</a></p>

CC BY-SA 4.0
2017-10-19T02:10:52.643Z
2018-08-15T14:58:50.487Z
2018-08-15T14:58:50.487Z
CraftQuest
<p>I just set up a Norwegian (default) / English multi-site myself, without touching a single config file or adding files/directories (apart from the actual translation-file containing strings in different languages) to the project.</p>

<ul>
<li>In the backend, I added the sites Norwegian with path <code>@web</code> (and saying that it is the main site) and English with path <code>@web/en</code></li>
<li>Then I configured my sections and fields to my liking, i.e. determining which ones should support localization</li>
</ul>

<p>And that was it - I see Norwegian content when accessing <a href="http://site.test" rel="nofollow noreferrer">http://site.test</a> and English content when accessing <a href="http://site.test/en" rel="nofollow noreferrer">http://site.test/en</a></p>

CC BY-SA 3.0
2018-03-01T14:22:59.283Z
2018-03-01T14:22:59.283Z
Fuglsetrampen
<p>Have you watched the Craft Hangout?</p>

<p><a href="https://straightupcraft.com/events/managing-multiple-sites-in-craft-3-sites-and-localization" rel="noreferrer">Managing Multiple Sites in Craft 3 – Sites and Localization</a></p>

<p>Might be of use if you haven't. You'll need about an hour free to view it.</p>

CC BY-SA 3.0
2017-03-24T10:18:50.177Z
2017-03-24T10:18:50.177Z
Steve Holland
<p>Hi guys are the any more detailed tutorials on how to setup a multi site on Craft3 BETA? I created two sites now, a Danish and English through the admin (Settings → Sites). The domain is the same but the Danish version will have the path <code>http://localhost:8888/dk</code> whereas the English version will be everything that does not have the first path of <code>/dk</code>.</p>

<p>I have set in the <code>general.php</code> the following:</p>

<pre class="lang-php prettyprint-override"><code>return [
    '*' =&gt; [
        'omitScriptNameInUrls' =&gt; true,
        'usePathInfo' =&gt; true,
        'generateTransformsBeforePageLoad' =&gt; true
    ],
   'SITEHANDLE_NAME_ENGLISH' =&gt; [
       'siteUrl' =&gt; 'http://localhost:8888/
   ],
   'SITEHANDLE_NAME_DANISH’ =&gt; [
       'siteUrl' =&gt; 'http://localhost:8888/dk'
   ],
    'defaultWeekStartDay' =&gt; 1,
    'enableCsrfProtection' =&gt; true,
    'omitScriptNameInUrls' =&gt; 'auto',
    'cpTrigger' =&gt; 'admin',
    'devMode' =&gt; false,
];
</code></pre>

<p>In the Danish folder <code>/dk</code>, I created a new <code>index.php</code>, and the site correctly direct to this file from the URL, BUT, it does not change the site to the the Danish site, even though I have defined my <code>index.php</code> with the new php constant:</p>

<pre class="lang-php prettyprint-override"><code>&lt;?php
// Project root path
$root = dirname('../');
define('CRAFT_SITE', "SITEHANDLE_NAME_DANISH");
// Composer autoloader
require_once '../craft_folder/vendor/autoload.php';

// dotenv?
if (file_exists("../craft_folder/.env")) {
    $dotenv = new Dotenv\Dotenv("../craft_folder/");
    $dotenv-&gt;load();   
}

// Craft
define('CRAFT_BASE_PATH', "../craft_folder/");

$app = require '../craft_folder/vendor/craftcms/cms/bootstrap/web.php';

$app-&gt;run();
</code></pre>

<p>How do I tell Craft to load the Danish site from the <code>index.php</code>? Right now it will only load the primary site not matter what I try.</p>

<p>Thanks!</p>

<craft3><multi-site>
Multi-site setup in Craft3
# Multi-site setup in Craft3

(Asked by: username_0 on 2017-03-24)

Hi guys are the any more detailed tutorials on how to setup a multi site on Craft3 BETA? I created two sites now, a Danish and English through the admin (Settings → Sites). The domain is the same but the Danish version will have the path http://localhost:8888/dk whereas the English version will be everything that does not have the first path of /dk.
I have set in the general.php the following:
return [
    '*' => [
        'omitScriptNameInUrls' => true,
        'usePathInfo' => true,
        'generateTransformsBeforePageLoad' => true
    ],
   'SITEHANDLE_NAME_ENGLISH' => [
       'siteUrl' => 'http://localhost:8888/
   ],
   'SITEHANDLE_NAME_DANISH’ => [
       'siteUrl' => 'http://localhost:8888/dk'
   ],
    'defaultWeekStartDay' => 1,
    'enableCsrfProtection' => true,
    'omitScriptNameInUrls' => 'auto',
    'cpTrigger' => 'admin',
    'devMode' => false,
];

In the Danish folder /dk, I created a new index.php, and the site correctly direct to this file from the URL, BUT, it does not change the site to the the Danish site, even though I have defined my index.php with the new php constant:
load();   
}

// Craft
define('CRAFT_BASE_PATH', "../craft_folder/");

$app = require '../craft_folder/vendor/craftcms/cms/bootstrap/web.php';

$app->run();

How do I tell Craft to load the Danish site from the index.php? Right now it will only load the primary site not matter what I try.
Thanks!

**Tags:** craft3, multi-site


---

## 3 answers

### Answer by username_3 on 2017-03-24. Score: 4 | Accepted answer

Have you watched the Craft Hangout?

[Managing Multiple Sites in Craft 3 – Sites and Localization](https://straightupcraft.com/events/managing-multiple-sites-in-craft-3-sites-and-localization)

Might be of use if you haven't. You'll need about an hour free to view it.


---

### Answer by username_1 on 2017-10-19. Score: 6

You can also check out the free video on it here: [Using Craft CMS 3 Multi-site](https://mijingo.com/lessons/craft-3-multi-site/)

Multi-site has changed as of Craft 3 RC11. It now requires much less config outside of the control panel. [See the official docs on Sites in Craft 3.](https://docs.craftcms.com/v3/sites.html)


---

### Answer by username_2 on 2018-03-01. Score: 1

I just set up a Norwegian (default) / English multi-site myself, without touching a single config file or adding files/directories (apart from the actual translation-file containing strings in different languages) to the project.

* In the backend, I added the sites Norwegian with path `@web` (and saying that it is the main site) and English with path `@web/en`
* Then I configured my sections and fields to my liking, i.e. determining which ones should support localization

And that was it - I see Norwegian content when accessing <http://site.test> and English content when accessing <http://site.test/en>


---

