How can I create a subdomain?
To create a subdomain:
- Log into StackCP by following this guide.
- Select the Subdomains icon.
- Enter your subdomain in the Subdomain field and select Create Subdomain.
You can also change the Document Root to point the subdomain to a folder of your choice.
What is the document root?
The document root is the folder the subdomain uses. For example, if you have a folder called support inside public_html (public_html/support), you can point your subdomain to it by entering public_html/support in the Document Root field.
Note: A change to the document root can take around 15 minutes to take effect.
Point the subdomain to your hosting
For the subdomain to work, its DNS needs to point to your hosting package. Add an A record for the subdomain (for example, support for support.yourdomain.com) with your package's IP address as the value. To find the IP address, see How do I find the IP address of a hosting package?
Where you add the record depends on which nameservers your domain uses:
- StackCP nameservers (ns1.stackdns.com to ns4.stackdns.com): log into StackCP and select Manage DNS.
- Westhost nameservers (dns1.westhost.com to dns3.westhost.com): edit the DNS in your CHI account. See How To Manage DNS.
- Another provider's nameservers: add the record in that provider's control panel.
DNS changes can take up to 24 hours to take effect.