You can host multiple websites with different domain names on one web hosting account. To achieve that you need to:
- Add domain names to the account. You can have up to 25 domain names pointing to your virtual server, each domain can have up to 25 subdomains under it.
- Upload websites to the server. Each website should be placed in different directories under /htdocs folder.
- Configure redirection. To redirect HTTP(S) requests to appropriate directories, you need to put a redirect script in the default document or modify the webserver configuration file. The architecture of the redirection is shown in the picture below:
When the requests are redirected using a script file, the URL in the browser for redirected domains will show the correct domain name plus the directory name where the request is being redirected. You can redirect the requests to a specific file in your /htdocs or any other directory. Examples of URLs: http://www.domain1.com/website1 or http://www.domain1.com/file1.htm. However, it is possible to configure the redirect using URL rewriter rules which allow redirection to subfolders without exposing their names in the URL.
- Windows 2003
- Windows 2008
Webserver configuration file: Configure URL Rewrite rules in web.config file.
Webserver configuration file: Configure mod_rewrite rules in .htacess file.
- When redirecting the requests for third-level domains in the default.asp or default.cfm script, the redirection string for the third-level domain must precede the redirection string for the corresponding second-level domain.
- Many search engines don't interpret redirect scripts properly. For this reason, if you are using a redirect script, you should submit the redirected-to URL to the search engine. For example, if you have domain1.com that redirects to domain1.com/website1, you should submit domain1.com/website1 to the search engine (not simply domain1.com).
- You must never redirect any domains to /. Redirecting a domain to / results in an infinite loop, and your account may be disabled to preserve uptime for other customers. All redirect command strings must point to a subdirectory, or to a file (other than the redirect file).