Loading...

Knowledge Base

What is a Subdomain Name & How to Create One

You don't always need to register a new domain name. Instead, you can create a subdomain using a domain you already own.

A subdomain is a prefix added to your main domain, such as blog.example.com. It works as a separate section of your website with its own content, under the same main domain, so you don't need to buy a new domain.

Note: Creating a subdomain doesn't register a new domain name. To register a new domain, visit our Domain Registration page. For instructions, see Registering a Domain Name with HostGator.

When Should I Use a Subdomain?

Here are some common ways to use a subdomain:

  • Add a help or support section
    If your website needs tutorials, documentation, or a Frequently Asked Questions (FAQs) section, you can put it on a subdomain such as help.example.com. This keeps a large amount of information organized and easy for visitors to find, while still connecting it to your main website.
  • Set up an online store
    Adding a store to your existing website can be difficult and may disrupt how your main site is set up. Instead, you can create your store on a subdomain such as shop.example.com. This lets you build and manage your store separately, without changing your main site.
  • Create a test site
    If you want to add a feature, try a new layout, or redesign your site without affecting your live website, you can build and test it on a subdomain such as test.example.com. When it's ready, you can move the changes to your main website.

How a Subdomain Appears

If your main domain is hgexample.com, examples of subdomains are:

  • blog.hgexample.com
  • forums.hgexample.com
  • help.hgexample.com

How to Create and Delete a Subdomain

This video tutorial shows how to create a subdomain in cPanel.

Create a Subdomain

To create a subdomain in cPanel:

  1. Log in to your Customer Portal.
  2. From the left-hand menu, navigate to Hosting and select My Plans.
  3. Click cPanel in the top-right corner of the hosting plan panel to access the hosting account's cPanel dashboard.

    Customer Portal - cPanel buton
     

  1. In the Domains section, click Domains.

    HostGator cPanel - Domains

  2. On the next page, click Create A New Domain.

    cPanel - Create a New Domain

  3. In the Domain field, enter the full subdomain, such as blog.example.com.

    cPanel - Enter Subdomain in Domain Field

  4. Don't select the Share document root (/home/username/public_html) with "domain.tld" option. If you share the document root, your subdomain will show the same content as your main domain instead of its own.

    cPanel - Share Document Root Unchecked

  5. Review the Document Root field. This is the folder where your subdomain's website files will be stored. cPanel fills it in automatically, but you can change it.
  6. Click Submit.

Delete a Subdomain

To delete a subdomain in cPanel:

  1. In the Domains section, find the subdomain you want to delete, then click Manage.
  2. Click Remove Domain.
  3. Click Yes, Remove This Domain to confirm.

For more details, including screenshots, see How do I Create and Remove an Addon Domain?. The steps are the same for subdomains.

Do you need addon domains? These articles explain how to create addon domains in cPanel:

Need additional assistance? HostGator's Support is here to help. Please contact us via phone or chat.

Loading...