Answers.Body: <p>You have one Craft install and one DB. Do everything described in <a href="http://buildwithcraft.com/help/localization" rel="nofollow">that article</a>, just replace the subfolder paths with the different domains:</p>
  
  <pre><code>return array(
      // ...
      'siteUrl' =&gt; array(
          'en' =&gt; 'http://example.com/',
          'es' =&gt; 'http://example.es/',
      ),
  );
  </code></pre>
  
  <p>Then all you have to do is to configure your webhost so that it routes those domains to different <code>index.php</code> files. It should contain the info about the locale and point to Craft folder:</p>
  
  <pre><code>// Path to your craft/ folder
  $craftPath = '../../craft';
  
  // Tell Craft to serve the Spanish site
  define('CRAFT_LOCALE', 'es');
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-10T21:12:21.437Z
Answers.Text: So the various index.php files would be renamed and would live on the main domain's hosting. Then we just point the other domains to their own, said index.php files?
Answers.UserDisplayName: Natetronn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-10T21:19:26.913Z
Answers.Text: Yes I see no reason this shouldn't work, or you put them in different folders.
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-10T21:28:44.623Z
Answers.Text: For pointing the non-main domains to their specific index.php files would you recommend doing and assuming the domain company allows it, DNS "CNAME" record change OR
  DNS "A record" change or other?
Answers.UserDisplayName: Natetronn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-10T21:29:50.783Z
Answers.Text: @Nate sorry can't help you with that. Good luck!
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-10T21:34:25.777Z
Answers.Text: No worries, I'm just fishing for as complete an answer as possible for everyone's reference. I think that's a good start, thanks!
Answers.UserDisplayName: Natetronn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-10T21:07:22.903Z
Answers.LastActivityDate: 2014-07-10T21:09:07.247Z
Answers.LastEditDate: 2014-07-10T21:09:07.247Z
Answers.UserDisplayName: carlcs
Body: <p>I read this <a href="http://buildwithcraft.com/help/localization" rel="nofollow">KB article</a> about localization though, the examples are for sub-folders.</p>
  
  <p>I'm wondering how to handle the same concept but, for different language based domains e.g.</p>
  
  <ul>
  <li>example.com</li>
  <li>example.mx</li>
  <li>example.es</li>
  </ul>
  
  <p>Currently I'm not sure if the different sites will be based on language or country though, let's assume country for this question. For example we'll have Mexico and Spain sites, both will be in Spanish but, will have different content which relates to each country.</p>
  
  <p>I asked CraftCMS about this on twitter and this was <a href="https://twitter.com/natetronn/status/487326868123967488" rel="nofollow">their reply</a>.</p>
  
  <p>Am I right to think that each site will have an install of craft, with the config/ general.php setup accordingly (in this case using domains instead of sub-folders?)</p>
  
  <p>And then we'll just link to the db in it's settings on each copy of config/db.php</p>
  
  <p>With that said, I'm hoping for some elaboration on this topic. Bonus points for including a multilingual, multi-domain and multi-environment for git workflow/setup in your answer ;)</p>
  
Tags: <localization><multi-environment><language><multi-domain>
Title: Localization - How do we manage multilingual, multi-environment on multiple domains?
ThreadText: # Localization - How do we manage multilingual, multi-environment on multiple domains?
  
  (Asked by: username_0 on 2014-07-10)
  
  I read this [KB article](http://buildwithcraft.com/help/localization) about localization though, the examples are for sub-folders.
  
  I'm wondering how to handle the same concept but, for different language based domains e.g.
  
  * example.com
  * example.mx
  * example.es
  
  Currently I'm not sure if the different sites will be based on language or country though, let's assume country for this question. For example we'll have Mexico and Spain sites, both will be in Spanish but, will have different content which relates to each country.
  
  I asked CraftCMS about this on twitter and this was [their reply](https://twitter.com/username_0/status/487326868123967488).
  
  Am I right to think that each site will have an install of craft, with the config/ general.php setup accordingly (in this case using domains instead of sub-folders?)
  
  And then we'll just link to the db in it's settings on each copy of config/db.php
  
  With that said, I'm hoping for some elaboration on this topic. Bonus points for including a multilingual, multi-domain and multi-environment for git workflow/setup in your answer ;)
  
  **Tags:** localization, multi-environment, language, multi-domain
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-07-10. Score: 2
  
  You have one Craft install and one DB. Do everything described in [that article](http://buildwithcraft.com/help/localization), just replace the subfolder paths with the different domains:
  
  ```
  return array(
      // ...
      'siteUrl' => array(
          'en' => 'http://example.com/',
          'es' => 'http://example.es/',
      ),
  );
  
  ```
  
  Then all you have to do is to configure your webhost so that it routes those domains to different `index.php` files. It should contain the info about the locale and point to Craft folder:
  
  ```
  // Path to your craft/ folder
  $craftPath = '../../craft';
  
  // Tell Craft to serve the Spanish site
  define('CRAFT_LOCALE', 'es');
  
  ```
  
  > **Comments:**
  > **username_0**: So the various index.php files would be renamed and would live on the main domain's hosting. Then we just point the other domains to their own, said index.php files?  
  > **username_1**: Yes I see no reason this shouldn't work, or you put them in different folders.  
  > **username_0**: For pointing the non-main domains to their specific index.php files would you recommend doing and assuming the domain company allows it, DNS "CNAME" record change OR DNS "A record" change or other?  
  > **username_1**: @Nate sorry can't help you with that. Good luck!  
  > **username_0**: No worries, I'm just fishing for as complete an answer as possible for everyone's reference. I think that's a good start, thanks!  
  
  ---
  
  