Subdomains in cPanel

From Lunarpages Web Hosting Wiki

Jump to: navigation, search

A subdomain would be a domain name that has a prefix in front of it representing the folder that it came from. For example, If you setup yourdomain.com/blog/ as a subdomain the new address for it would be blog.yourdomain.com. For more on the domain name differences, please check here.

How to Setup a Subdomain in cPanel

The first thing you need to do is login to the cPanel for your hosting account. Then on the front page, you should see an icon named "Subdomains". Clicking it will take you to the Subdomain Maintenance web page:

Image:cpanelsubdomains1.png

Into the empty text box, enter the name of the new subdomain. Next, make sure the drop down box is set to your primary domain name. Double check your information you have put in, and if everything is correct, hit the "Add" button to create the subdomain.

A folder (directory) is automatically created with the same name as the new subdomain. It is located in the root (public_html) directory. This is where you would upload the files for the subdomain.

Redirect a Subdomain in cPanel

If you like, you may redirect a subdomain to any URL of your choice. To do this, login to cPanel and then on the front page, you should see an icon name "Subdomains". Click it to go back to the Subdomain Maintenance screen.

Now under the empty text box where you created a new subdomain before, now you should see a drop down box that provides you with a list of your subdomains. Select the one you wish to redirect and click on the button that reads, "Setup Redirection". That should take you to this new web page:

Image:cpanelsubdomains2.png

Enter the URL where you wish the subdomain to point. If it is pointing to a specific page, make sure you include a trailing "/". Once you have done that, review your information and if it is all correct then hit the "Save" button.

To remove the subdomain redirect, login to cPanel and then on the front page, you should see an icon name "Subdomains". Click it to go back to the Subdomain Maintenance screen.

Now, scroll down the page till you get the drop down selection box next to the "Remove Redirection" button. Select the subdomain redirect you wish to remove and click on the "Remove Redirection" button.

Delete the Subdomain in cPanel

To delete a subdomain, login to cPanel and then on the front page, you should see an icon name "Subdomains". Click it to go back to the Subdomain Maintenance screen. Scroll down to the last drop down box on the page, select the subdomain you wish to delete and then hit the "Delete" button.

Please Note, cPanel DOES NOT SUPPORT adding subdomains to addon domains at this time.

Want to read this in another language?
Personal tools