Answers.Body: <p>Yes it is possible. I have it done on a site which has some sub sites with different domain name. </p>
  
  <p>You set your multi-environment configs for each site/subsite. </p>
  
  <p>Then based on the domain the site is accessed by include different header/footer files. Then the main content/templates are mostly the same. 
  Can share news between the sites so works well. 
  I have a different structure controlling the main nav for each site. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-11T23:44:50.877Z
Answers.Text: So in order to do that do you need Craft Pro?
  
  And do you do it with multi-environment config with 2 public folders, etc?
Answers.UserDisplayName: Dimitrios Vogiatzis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-11T23:53:07.440Z
Answers.Text: Not necessarily. I did on the site I had as needed users functionality and back then needed Pro for the structures but everything mentioned above possible with lesser versions. Structures now included on the free version for personal sites.
Answers.UserDisplayName: mmc501
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-13T10:53:09.587Z
Answers.Text: Can you be a bit more specific how you accomplished this?
Answers.UserDisplayName: Dimitrios Vogiatzis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-13T11:06:10.503Z
Answers.Text: What part? In my general config file have the setting for each domain and I sera variable, e.g. siteid. Then in template files, eg main layout one I have a switch statement based on the siteid variable to pull in different header and footer files. The different header files get their main nav from different structures. Then say for a news section you can use the same main body templates if necessary.
Answers.UserDisplayName: mmc501
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-13T11:13:14.493Z
Answers.Text: Here is a question I had asked before doing it: http://craftcms.stackexchange.com/q/9763/622
Answers.UserDisplayName: mmc501
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-11T21:27:44.003Z
Answers.LastActivityDate: 2015-12-11T21:27:44.003Z
Answers.UserDisplayName: mmc501
Answers.Body: <p>Multi-environment-configs: don't think so.</p>
  
  <p>Maybe a solution is to use json template files on website1.com that you read (without craft) on website2.com?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-10T21:22:09.493Z
Answers.Text: The idea is to have two websites with two different domains and one install.
  
  The main reason is because the 2 websites share the same content so it's pointless to have the same content input twice.
Answers.UserDisplayName: Dimitrios Vogiatzis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-11T21:09:21.010Z
Answers.LastActivityDate: 2015-12-11T21:09:21.010Z
Answers.UserDisplayName: Dave Driesmans
Body: <p>I'm trying to build a website for a client that has actually two websites for different locations and we need to merge both of them in a new one. </p>
  
  <p>The only thing is that he wants to keep the domains separate, which means that when you visit website1.com you will see templates for that website and the url address will display website1.com/.../ etc. And when you visit website2.com while you browse the site you will retain this url. </p>
  
  <p>Is this possible with Craft? Because we will have one database and install but 2 domains with one parked over the other. Can this be done with the Multi-environment technique described here? </p>
  
  <p><a href="https://craftcms.com/docs/multi-environment-configs" rel="nofollow">https://craftcms.com/docs/multi-environment-configs</a></p>
  
Tags: <multi-domain>
Title: Two domains with two different templates
ThreadText: # Two domains with two different templates
  
  (Asked by: username_0 on 2015-12-11)
  
  I'm trying to build a website for a client that has actually two websites for different locations and we need to merge both of them in a new one.
  
  The only thing is that he wants to keep the domains separate, which means that when you visit website1.com you will see templates for that website and the url address will display website1.com/.../ etc. And when you visit website2.com while you browse the site you will retain this url.
  
  Is this possible with Craft? Because we will have one database and install but 2 domains with one parked over the other. Can this be done with the Multi-environment technique described here?
  
  <https://craftcms.com/docs/multi-environment-configs>
  
  **Tags:** multi-domain
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-12-11. Score: 1 | Accepted answer
  
  Yes it is possible. I have it done on a site which has some sub sites with different domain name.
  
  You set your multi-environment configs for each site/subsite.
  
  Then based on the domain the site is accessed by include different header/footer files. Then the main content/templates are mostly the same.
  Can share news between the sites so works well.
  I have a different structure controlling the main nav for each site.
  
  > **Comments:**
  > **username_0**: So in order to do that do you need Craft Pro?  And do you do it with multi-environment config with 2 public folders, etc?  
  > **username_1**: Not necessarily. I did on the site I had as needed users functionality and back then needed Pro for the structures but everything mentioned above possible with lesser versions. Structures now included on the free version for personal sites.  
  > **username_0**: Can you be a bit more specific how you accomplished this?  
  > **username_1**: What part? In my general config file have the setting for each domain and I sera variable, e.g. siteid. Then in template files, eg main layout one I have a switch statement based on the siteid variable to pull in different header and footer files. The different header files get their main nav from different structures. Then say for a news section you can use the same main body templates if necessary.  
  > **username_1**: Here is a question I had asked before doing it: http://craftcms.stackexchange.com/q/9763/622  
  
  ---
  
  ### Answer by username_2 on 2015-12-11. Score: 1
  
  Multi-environment-configs: don't think so.
  
  Maybe a solution is to use json template files on website1.com that you read (without craft) on website2.com?
  
  > **Comments:**
  > **username_0**: The idea is to have two websites with two different domains and one install.  The main reason is because the 2 websites share the same content so it's pointless to have the same content input twice.  
  
  ---
  
  