Loading...

Knowledge Base

How To Create A Subdomain

A subdomain is a custom name you add in front of your main website address, like blog.example.com or store.example.com. You can use it to organize different parts of your site. Just like a regular domain, you can point it to a folder and run a separate website on it.

How To Create a Subdomain

  1. Log in to your Bluehost Account Manager.
  2. Click Hosting in the left-hand menu.

    Bluehost Account Manager - Hosting Tab
     

    The details of your hosting plan will be displayed.

    Bluehost Account Manager - Hosting Tab Details
     

  1. Click on cPanel.
  2. From the cPanel, click on the Domain Names icon. Click Domains.

    bluehost-account-cpanel-click-domain-names-click-icon-Domains-am-hosting-cpanel
     

  3. Click the Create a New Domain button.

    cpanel-domains-create-a-new-domain-button
     

  4. Input the desired subdomain name you want to create in the Domain field.
  5. Uncheck the option "Share document root (/home/username/public_html) with domain.tld."
  6. Choose the directory for the website you want to show, ideally named after your subdomain. Then click Submit.

    domains-create-a-subdomain-click-submit-button
     

Hosting Only A Subdomain

  1. In Bluehost, create an account with the domain name you purchased elsewhere.
  2. In your Bluehost cPanel, create the subdomain you need to host with us (i.e., "subdomain.example.com.")
  3. Contact the host of your domain name's zone file and have them point the A record for the subdomain to the IP of your server.

Restrict Subdomain Access to Addon Domains

Each addon domain requires a subdomain. Using mod_rewrite, you can stop people from using the addon domain as a subdomain of the primary domain.

Put this in the .htaccess file located in the subdomains folder, changing the subdomain, primarydomain.com, and addondomain.com:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain.primarydomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.subdomain.primarydomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^addondomain.com$
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ http://www.addondomain.com/ [R=301,L]

Summary

Creating a subdomain is an easy way to organize your website and improve how you manage it. It helps keep your site structured and makes your online presence more efficient. It will require logging into your Bluehost account, navigating to cPanel, and selecting the Domain Names section to configure your desired subdomain and its directory..

For exclusive subdomain hosting, ensure the domain's A record points to your server's IP. Additionally, restrict access to addon domains by configuring .htaccess in your subdomain's folder.

If you need further assistance, feel free to contact us via Chat or Phone:

  • Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
  • Phone Support -
    • US: 888-401-4678
    • International: +1 801-765-9400

You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.

Did you find this article helpful?

 
* Your feedback is too short

Loading...