You add multiple website in the admin -> manage websites. You can set domains, subdomains and point to different start pages.
This is described in the web help here: http://webhelp.episerver.com/latest/cms-admin/managing-websites.htm
Worth noting that if you are in a licence set up then there are additional charges for additional site(s) - contact your local Episerver office to discuss. If you are running Episerver Digital Experience Cloud Service then you can have unlimited sites.
All the above is correct, but also please be aware that you cannot make a subpage of an existing site the root of a new site.
I.e. with the following setup:
-> Page 1
-> Page 2
'Subpage' cannot be made the root of a new site.
Thankyou all for the important information , its one thing which I am strugling is
my startpage for the 2nd website is actualy not of type startpage. It is of custom type.
So , it wont be able to execute
public virtual LayoutModel CreateLayoutModel(ContentReference currentContentLink, RequestContext requestContext)
var startPage = _contentLoader.Get<StartPage>(ContentReference.StartPage);
as above line needs the page to be of <StartPage> type. And I cant have if else here becoz starpage valur is being used till the function ends.
So , is it mandatory to have the first or homepage of the second website as <StartPage> type.
No the StartPage type is just something that was created on the Demo site. The content type of the homepage can be any PageData base type you want. A common practice might be to put all the common StartPage properties you want to share in a parent class and inherit that class for both of your start page types. Then you can load this shared type.
Or can you adjust your logic to just load the home page as PageData and check/cast in to whichever type is appropriate.
Wish to create multiple websites but with diffeent start page.
Eg: I have a website with "abc.se" and contains a page called entreprenad.
Now I wish to create awebsite called "abcentreprenad.se" and not abc.se/entreprenad.
The "entreprenad" page is not of startpage type.