Subdomains
outline
You can use this interface to create and manage subdomains for your cPanel account. A subdomain is a subsection of your website that exists either in the public_html (document root) directory or in your account's home directory. Subdomains use a prefix in association with the domain name.
For example, if the registered domain name is example.com, the subdomain would be prefix.example.com. Subdomains allow you to create unique user accounts for vanity domains.
Note :
Visitors will not be able to see your subdomain immediately. If you change to DNS records, it may take 2 days or more to reach all name servers on the Internet.
Create subdomain
Caution :
Due to the order in which Apache processes configuration files, wildcard subdomains can be This may interfere with the functionality of service subdomains . We strongly recommend using wildcard subdomains when absolutely necessary or when you do not need to use a service subdomain.
To create a subdomain, follow these steps:
1. Enter the desired prefix in the Subdomain text box.
2. Select your desired primary domain from the menu.
3. In the Document Root (Document Root) text box, enter the home directory of the subdomain.
Note :
- The house icon represents the home directory of your cPanel account.
The Document Root text box defines the directory in your new domain compared to your cPanel account's home directory. For example, if you type subdomain in the Directory text box and your cPanel account uses a home directory of /home/example, your subdomain will exist in the /home/example/subdomain.example.com/ directory.
The system automatically populates this text box with the fully-qualified domain name (FQDN) of your subdomain.
The following directories cannot be used as document roots:
- The account's home directory itself ( / )
Directories outside the account's home directory ( ./ and ../ )
.cpanel
.trash
etc
ssl
tmp
logs
.cphorde
.spamassassin
.htpasswds
var
cgi-bin
.ssh
perl5
1. Click Create.
When you create an add-on domain, parked domain, subdomain, or main domain, the system automatically attempts to secure that domain with the best available existing certificate. If a certificate does not exist, the system creates a self-signed certificate to secure the new domain.
- Once AutoSSL is enabled for the account that owns the new domain. , the system will add a request for an AutoSSL certificate to secure and install new domains as they become available.
- File Manager (File Manager ) Interface ( cPanel > > Home > > File > > File Administrator To open a subdomain's main directory with ), click the link under the document root ( Document Root ) corresponding to that subdomain.
Subdomain search
To search each subdomain, follow these steps:
- Enter search criteria in the Search text box.
- Click Go ( Go ).
Edit subdomain
Modifying the document root for a subdomain
To modify the document root for a subdomain, follow these steps:
1. Click the notepad icon corresponding to the subdomain you want to manage.
2. Enter the new file path to use as the document root in the available text box.
Note :
The following documents cannot be used as document roots:
- The account's home directory itself ( / )
- Directories outside the account's home directory ( ./ and ../ )
- .cpanel
- .trash
- etc
- ssl
- tmp
- logs
- .cphorde
- .spamassassin
- .htpasswds
- var
- cgi-bin
- .ssh
- perl5
1. Click Change.
Enable or disable subdomain redirection.
Note :
Redirect a specific URL within a subdomain or add www. If the prefix is included, cPanel's Redirects interface ( cPanel > > Home > > Domain > > Redirect ) is used.
To enable or disable redirection for a subdomain, follow these steps:
1. Click Manage link corresponding to the subdomain you want to manage.
2. To redirect a subdomain, enter the link you want to redirect the subdomain to in the available text box.
3. Click Save ( Save ).
4. To disable redirection, click Disable Redirection ( Disable Redirection ).
Remove subdomain
To remove an existing subdomain, follow these steps:
1. Click ( ) link corresponding to the subdomain you want to remove.
2. Click Yes (Yes) to confirm subdomain removal.
3. Click No ( No ) to keep the subdomain.
Original: Subdomains