How To Create A Subdomain For Your Website


How To Create A Subdomain For Your Website

In our previous post ‘How To Speed Up A Website – Case Study’ we mentioned that in some cases it can be beneficial to set up a subdomain for your site, instead of including everything on one site.  But how do you go about setting up a subdomain?  Well in today’s post, we are going to show you both how to set one up and why you should.

Let’s get started…

What Are Subdomains?

A subdomain is a second website that can be created within your existing website.  For example, ‘’ or ‘’ would be a subdomain of the main site ‘’.

This means that you can create a second website, with original content, without having to purchase a new domain or separate hosting.  You are simply changing ‘www’ to something else.

Why Should I Create A Subdomain?

You are probably thinking “Why would I want to create a subdomain within my existing site?

Good question!  Well, a subdomain allows you to create different sections of a site without putting too much strain on your main site.  A good example would be if you had a forum, shop or membership part to your site.  If you were to include all these on your main domain (, it would put unneeded pressure on your site as everything would need to be loaded.  All your plugins, images, ads, forum threads, shop products, etc. would be kept and loaded from one domain.  Not only can this slow down your site (see our guide on how to speed up your site) but it can also lead to future problems (e.g. if your forum went down it would also take your shop down).

If you were to create a subdomain for each individual aspect, it would make things a lot easier.  You would be able to create a shop ( that you can manage separately from your main site allowing you to add all the necessary plugins and security information.  You could create a membership area ( where you can add exclusive content that only paying members can access.  Perhaps you could add a forum ( where you let visitors ask questions and interact with one another.  The possibilities are endless!

Many websites do this (big and small) as it makes it easier to manage the overall site.  Take ‘’ as an example.  That is a HUGE site that deals with a vast amount of different subjects.  It uses subdomains for each city that it operates in (e.g.  ‘’ or ‘’).  Without subdomains it would be practically impossible to manage.

Advantages Of Using Subdomains

  • Multiple Websites – Each subdomain is technically a separate website, which is treated as such by search engines.  They will have a separate PageRank and Domain Authority, which will help you rank well.
  • SEO and Internal Linking – The fact that you have multiple websites means that you can show up more times in the SERPs (search engine result pages).  You can rank well for different things, such as local search if you use the craigslist example from above.  Also consider that you can (and should) link between your subdomains and you can begin to see the SEO benefits of doing so.
  • Boost To Main Domain – All your subdomains will link to and have your main domain included, so it will help to promote your main site.  People may find your site based on a forum thread or shop item that you are selling, but then discover your whole site.  Subdomains can act as ways to help draw in more traffic to your overall site.

How To Create A Subdomain?

For the purpose of this tutorial, I will be using HostGator as that is the host that I use.  If you use a different Hosting provider, there will be a very similar process to setting up your domain name.

First things first, you need to log into your hosting cPanel.  Here you can scroll down to the ‘Domains’ section and click on ‘Subdomains’.

Create a Subdomain

In the following ‘Create a Subdomain’ box, you can enter what you want your subdomain to be called.  Make sure to select your main domain in the drop-down box, not a previously created subdomain (you don’t want a subdomain of a subdomain).

In the ‘Document Root’ section, you can name the folder that you subdomain files will be saved in.  By default it will save it as whatever you have named your subdomain.

Hit ‘Create’ when you are happy.

Create a Subdomain

You have now created a subdomain for your site!

Create a Subdomain

WAIT!  We haven’t quite finished yet.  If you were to navigate to your newly created subdomain, you will find this;

Create A Subdomain










Well that’s not very good.  We may have created the actual subdomain, but we haven’t created the site to go on It yet.

Go back to your cPanel homepage, scroll down to the ‘Software/Services’ section and click on ‘Fantastico De Luxe’.

Create a Subdomain

Here you will be able to select and automatically install a whole host of scripts for your site, including; WordPress, Drupal, Joomla, Mambo, phpBB, OS Commerce and many more!  We are going to install WordPress for the purpose of this tutorial.

Create a subdomain

Simply follow the on-screen instructions and fill in all the necessary details about your new site.  REMEMBER to install on the newly created subdomain that you have just set-up.

Create a subdomain

Now, if we check our subdomain we will see that a basic WordPress site has been set up.  You can now login to your subdomain site’s WordPress dashboard and set up your site like you would any other site.

create a subdomain

Creating a Subdomain Recap

  1. Log into cPanel and click on ‘Subdomains’
  2. In the dropdown box, choose your main domain.
  3. Enter in what you want your subdomain to be called.
  4. Hit ‘Create’
  5. Go back to cPanel and click on ‘Fantastico’
  6. Click on and install WordPress (or whichever script you want to add)

Here is a useful video that shows you how to set up a subdomain that you may find useful.  You can also check out this post from HostGator to help you.

There we have it!  You have now created your own subdomain for your site.  All you have to do now is add whatever content you want to the site.  Just remember to add a link both to and from your main website.

Have you setup a subdomain for your site?  Have you ever thought about setting up a subdomain before?  Please let us know in the comment section below!

About Matt Smith

Matt Smith is the founder and editor of OnlineIncomeTeacher. He is a Professional Blogger, SEO Consultant & Web Developer, running a number of sites from the UK. Connect with him on Twitter, Facebook, Google+ and LinkedIn.

  • Catherine Holt

    Another great post Matt…and now I have my subdomain all ready to roll 🙂

    Just a note though…when I went to set it up, I had trouble getting Fantastico to work. I went onto Hostgator Live Chat and they said to use “quick set up” instead as they would be rolling out Fantastico soon. That was incredibly easy :-0

    • Hi Catherine,

      Hadn’t heard that about Fantastico. Seemed to work fine when I set this example subdomain up, but it’s good that you mentioned that. May have to update the post when they switch to ‘Quick Set Up’

  • Clair Trebes

    I’ve created a few subdomains in my time ….. This is such AN easy step by step guide and informative too (explaining WHY its good to have them!) Great work Matt, sharing this out now! 🙂

  • Freaking awesome Matt! 🙂

  • Nice article my friend.