Shared hosting might be cost-saving and reliable when starting a new blog or small business website, but it comes with one big challenge – keeping all your website’s load on one server under control.
For this reason, it is important that you have an option B. In this case, your option B will involve you hosting your subdomain on another hosting account.
A subdomain refers to a domain that is part of a bigger domain and part of the Domain Name System hierarchy.
The use of subdomains is seen as a way to create even more memorable web addresses for unique/ specific content within your website.
Acting like a child domain, its use increases the ease with which your online users remember and navigate your site.
In essence, the use of subdomains results in an improved organization of your website’s content, as well as improved sharing for your allocated domain. Regarding the sharing of domain spaces, users require usernames and passwords to use the subdomains, and every subdomain has varying levels of accessibility features.
The use of subdomains is also important because it results in the shortening of the long links making links easier to remember.
For all these benefits, you might have to host the subdomains in different hosting accounts.
Contents In Page
How to host a subdomain on a different server host
There are two steps involves when hosting subdomains in different host servers: adding an A Record into the DNS for the subdomain and setting up the subdomain onto another server.
If your domain is registered by GoDaddy and is using the GoDaddy DNS servers but your site runs on NameCheap or BlueHost, and you would like to host a subdomain on a HostGator server, this article is for you.
Adding the A Records to a DNS for the subdomain
DNS refers to the system that interprets your domain name into your server IP address. Your domain registrar or your web host offers you a DNS manager that you can use to set up CNAME or A records to your other host.
For you to host your subdomain on a different web host or hosting server, you have to point you’re a Records for the subdomain to point to your new IP server.
How to find your server IP address
If you want to point your domain’s DNS records (pointing A records) to your server IP address, you could easily find your IP address from the cPanel.
You could also use the cPanel to find your shared server’s IP address then use the address to point your DNS records from the domain registrar to your web host. Alternatively, you could configure your DNS records if you do not wish to point to the DNS name servers.
So, to find the server IP address, the first log into the cPanel using your username and password. The use of the cPanel is highly recommended because the cPanel is regarded as the best web server management tool. The cPanel is effective in the website, email, database, and domain management.
To view the server IP address, click on the Expend Stats button. You will not, however, see the IP address if it’s been expended. If you cannot find it, scroll down to the browser window or maximize your window.
Now that you have the server IP address let’s look at how to add the A records to your DNS.
Useful Articles Only For You
Adding A Records
Using the scenario above – with GoDaddy as your domain registrar, it means that your domain name points to GoDaddy rather than NameCheap or BlueHost.
In this case,
- You will have to manage the DNS records with your host, GoDaddy.
- For this, you need to add A records into your GoDaddy DNS manager.
- Next, click on the Total DNS Control and MX Records tab. You will get a window which has different groups.
- The first group of records is named A records (host) and is located on the window’s top right.
- Next, click on Add New A Record then enter your hostname and the IP address of the server you wish to point the records to.
- The A records will feature host’s new server IP.
- By doing this, you redirect the subdomain to point to a new web host.
Add your selected subdomain to the DNS using your DNS Manager Tool in the GoDaddy admin account panel then map out your subdomain to the new host’s server IP.
As you can see, this process is simple, and you only need to add your A records from the server’s DNS (Server A) then allow the added records to point out to Server B’s IP address.
Setting up the Subdomain on a different host
Now that you’ve added the A records for your subdomain let’s look at how to set up the subdomain with a different web host.
Log into the new web host’s cPanel account then click on the Domains section. Under domains, you have a subdomain. Click on the subdomain or add a new subdomain to your new server, but without the main domain.
To add a subdomain to a new server without your main, add the subdomain as a top-level domain or a TLD. You can do this by clicking on Addon Domain under Domains in the cPanel. Addon domains will allow your site’s visitors to access your website’s subdomain.
In the Addon Domains window, type in the subdomain into the New Domain name field then check the FTP/ Subdomain username box. Doing this prompts the system to populate the field with the details of your subdomain automatically. It will also fill up the Document Root field.
When complete, you will receive a notification showing the successful addition of the Addon domain. You could also manage your files for the subdomain.
Note: because of propagation, it will take at least 24 hours for you to access the new subdomain.
Creating and managing Subdomains
As mentioned above, subdomains represent extensions of main domains but thy function separately for the main domains, hence their use in hosting more websites. A subdomain is available in the subdomain.subdomain.com’.
For you to create and manage a subdomain, you require access to a cPanel and a fully functioning domain that points to the hosting provider correctly.
To create a new subdomain,
- Go to the web host’s cPanel then click on subdomains.
- You only enter the subdomain extension in the subdomain field.
- The domain field lets you choose the domain name under which the subdomain is to be created.
- You also have the Document Root which is the subdomain’s root directory.
- The Document Root folder is, by default, created in public_html format.
- Next, click on the Create button.
- You will receive a subdomain creation confirmation.
Managing your subdomain
You need to upload files into your subdomain’s document root directory. This directory is easily accessible from the File Manager section of the cPanel.
If you created your subdomain using the Addon Domain button, you would find your subdomain’s Document Root in the addon domain’s root directory.
If, at any time, you realize that you no longer need a subdomain or if you entered the wrong subdomain, you will not be doomed. You get to remove the subdomain easily by clicking on the Remove button in the Subdomains tab under the cPanel.
Note: however, that your files and the root directory will not be removed automatically and you’ll need to remove the files manually using an FTP client or the file manager.
On the other hand, if you need to create a new subdomain with similar content, but under a different name, you should consider deleting the old subdomain, then create a new subdomain with the same name as one of the root directories.
Changing the DNS
The subdomains function separately from your main domain which means that the subdomains could have different DNS configurations. To update your subdomain’s DNS settings, go to the cPanel then click on either the Simple Zone Editor or the Advanced Zone Editor.