Adding subdomains

To add subdomains, your site must be set up to host subdomains. Only your service provider can change this setting. If subdomains are enabled for your account, the Subdomains option is listed in the shortcuts area.

The number of subdomains you can add is set by your service provider. You can choose to be the owner of a subdomain or delegate ownership to a user of the site.

- Important: Before you assign the subdomain to a user, ensure that you have created a user for the site.

To add a subdomain:

1. Click the Shortcuts tab on the Home page
   .

2. In the shortcuts area, click Subdomains (Web Server section).

3. In the Subdomain submenu, click Add Subdomain. The Add Subdomain form opens.

4. Enter the name of the subdomain in the Name field.

5. Note: To create a subdomain sales for the site, www.example.com, enter only sales in the Name field and not sales.example.com. Note that the domain name of your site is already suffixed in the Name field.

5. In the Owner field, click the arrow to select an owner for the subdomain.

6. Note: Any existing user of the site can be authorised to be the owner of the subdomain. You can also choose to be the owner of the subdomain.

6. In the Full Directory Path field, enter the name of the subdomain directory. You will upload your subdomain content to this directory.

- Note: The Full Directory Path is prefixed by the path, /<base_directory>/
  Where:
  <base_directory> is the directory path set by your service provider while creating the site. The default base directory is /var/www.
  For example, if you specify mysubdomain in the Full Directory Path field and /var/www is the base directory configured by your service provider, then your subdomain is located at /var/www/mysubdomain.

5. Important: The subdomain directory, once defined, cannot be changed.

7. In the CGI Support field, select the checkbox if you want users to run CGI scripts on the subdomain, otherwise leave it blank.

7. Note: The CGI scripts for the subdomain will be placed in the cgi-bin directory under the subdomain folder.
   For example, if your subdomain is located at /var/www/<subdomain_name>, then your CGI scripts will be placed in the following location:
   /var/www/<subdomain_name>/cgi-bin/
   where <subdomain_name> is the name of your subdomain.
   Your subdomain can run any script placed in the cgi-bin directory. To run a subdomain CGI script, in the Address field of your Web browser, type http://<subdomain_name>.<domain_name>/cgi-bin/<script_name>
   where:
   <subdomain_name> is the name of your subdomain
   <domain_name> is the domain name of the site on which your subdomain is hosted
   <script_name> is the name of the cgi script

8. Click Add Subdomain.