Multiple websites on a single domain (in subfolders)

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

In some cases, you may want to run multiple websites in separate subfolders, without getting a new domain.


In this case, you can configure the domain names (or domain aliases) of the websites like in the following example:




1. Install Kentico CMS to the following folder: C:\inetpub\wwwroot\mykenticofolder. Make sure the name of the folder is different from the name in the URL that you will later enter in IIS. In the same step of the installer, choose This is an installation to the root (do not create virtual directory). When the setup finishes, the link to your new website will not work as the virtual directory is not created in IIS.


2. Open IIS console (Control Panels -> Administrative Tools -> Internet Information Services) and create a new virtual directory named mykenticoweb. Assign it to a non-website-root folder on your disk. Ideally, create an empty folder on the disk for this purpose (e.g. c:\empty).


3. Create two new virtual sub-directories under mykenticoweb called web1 and web2. Both of them need to be assigned to the installation folder on the disk, which is C:\inetpub\wwwroot\mykenticofolder in this example.




4. Now open your browser and type in either http://localhost/mykenticoweb/web1 or http://localhost/mykenticoweb/web2. Kentico CMS Database setup appears. Continue through the setup as usual and install the first site.


5. When the setup finishes, go to Site Manager -> Sites and install the second site.


6. Configure website 1 domain name as: localhost/mykenticoweb/web1


7. Configure website 2 domain name as: localhost/mykenticoweb/web2


Now when you go to http://localhost/mykenticoweb/web1, you will see website 1. If you go to http://localhost/mykenticoweb/web2, you will see website 2.


Page url: