Managing Subdomains with Webmin and cPanel

From OCS Support Wiki

Jump to: navigation, search

Contents

[edit] Introduction

Managing subdomains differs slightly on cPanel and Webmin. This guide will describe the differences and help you decide on how best to deal with subdomains.

[edit] What is a Subdomain?

A subdomain is a website that has an address similar to sub.domain.com, where sub is the name of the subdomain and domain.com is the domain name of your website. You might also notice that in the address www.domain.com, www is technically a subdomain as well. While this is true, it is generally considered part of the primary domain.

[edit] How do I manage subdomains on cPanel?

cPanel lets you manage subdomains inside the control panel interface. When you login to the control panel, you will notice a button on the front page for managing subdomains:

image:cpanel-subdomains-1.jpg

When you click this icon, you will see a screen similar to the following:

image:cpanel-subdomains-2.jpg

On this page, you can add a subdomain, delete one, or setup a subdomain to redirect to another URL. If you are using our DNS, you do not have to worry about creating an A record for the subdomain, we automatically handle this via a wildcard subdomain record. If you are using a 3rd party DNS system, you will need to add an A record for this subdomain or a wildcard.

In cPanel, when you create a subdomain, its website files will go in /home/username/public_html/subdomain (where username is your username and subdomain is the name you give the subdomain).

If you want the subdomain to have its own website and its own cPanel, you will need to add it as a separate website.

[edit] How do I manage subdomains on Webmin?

On Webmin you simply create new virtual servers for each subdomain you want to use. For this, please refer to Managing_Multiple_Domains_with_Webmin

[edit] DNS

If you are using our DNS, then you don't have to worry about subdomain entries. We automatically wildcard each domain using our DNS so that you can create any subdomain you want without worrying about DNS entries.

If you are not using our DNS, you will need to add an A record, or a wildcard record, pointing to the same IP that your website is on.