How to Host a Subdomain on a Different Hosting Server?

When you host your domain on a server, you may probably get an opportunity to make a few to unlimited numbers of subdomains on that server.

If you have a custom domain, the number of subdomains you can make has no limitation.

However, the numbers of subdomains you can make on a particular server depends upon how much flexibility does the hosting service provider.

If, your plan allows unlimited numbers of subdomains you can make any numbers of subdomains. In this case, there raises no question for hosting a subdomain on a different hosting server.

However, in some cases you may need to host a subdomain on a different hosting server. The reason might be any of the following.

  • Hosting service provider does not allow to create a subdomain on their server.
  • Only limited numbers of subdomain are allowed to create on that server
  • Main Domain is hosted on with Blogger,
  • Subdomain you needed for something that requires more speed and storage on the main server is not enough.

There might be some other reasons – If you have any let me know in the comment before you start hosting a subdomain on a different server.

The reason I realized why I would need to host my subdomain somewhere on a separate server is explained below.

This situation occurred to someone I am familiar with. He was running a domain simply for Blogging.

One day he decided to launch an eCommerce site with products related to his blog brand.

The blog he was running was under a managed WordPress server where he was not ready to start the eCommerce subdomain as the storage was just 5GB.

And upgrading a Managed WordPress hosting service definitely was costing around double the cost of another unlimited shared hosting which was capable of handling traffic for a small e-commerce site.

Therefore, instead of migrating the main domain, we decided to let it be on that managed server and host a subdomain on a different hosting server.

Here is the process that we followed to host a subdomain on a different hosting server.

Hosting a subdomain on a different hosting server involves a very easy process. If you don’t have idea of what is DNS records and how it works, you may find it a bit difficult.

A Step by Step Guide on How to Host a Subdomain on a Different Hosting server

The following step-by-step guide will help you to host a subdomain on a different hosting server. This will hardly take 10-15 minutes in general.

Deciding Subdomain

It is probable that you might have already decided what subdomain you wanted to create.

If you have not decided on the subdomain name yet, decide on a short and relevant subdomain name. Such as shop, blog, services, deals, etc.

Finding The Server IP

As you are going to host your subdomain, there is no way to point to the server through nameserver. Therefore, you will need to point your subdomain to the server through the server’s IP address.

To find your server IP address, you will need to log in to your server through cPanel or any control panel your server uses.

In cPanel or vPanel, the IP address of your server appears at the right sidebar or below the main functions area, under the General Information section.

If you can not find it here, your service provider probably has given an IP address such as 210.183.185.225/cpanel to access your cPanel. This will be your server IP.

If you are having trouble finding server IP, then contact your hosting service provider, they will definitely provide it.

 

 

Finding IP Address of your server while you host a subdomain on a different hosting server

 

 

 

When you find out the server IP, copy the subdomain hosting server IP address and note it somewhere.

 

Managing DNS Records to Host a Subdomain on a Different Hosting Server.

 

As mentioned above, you will have to point the subdomain to your server IP.

To point your subdomain to server IP, you will need to add a DNS record (A Record). And to add “A record”, you will need a DNS manager.

 

There are multiple options I can give you to add an “A record” that points to your server IP.

 

But, the preferred method is Cloudflare’s DNS manager. I strongly recommend you to use Cloudflare’s DNS manager.

 

Creating DNS Record Using Cloudflare’s DNS Manager

 

Cloudflare does various jobs such as making the connection proxied, managing DNS records, SSL certificate for free, caching, installing apps, etc.

 

You can use Cloudflare for various purposes as you may need. If you have already added your Domain on Cloudflare, then you may probably know how to manage your DNS.

 

If you have no idea about using Cloudflare, here I have included everything you will need to learn about Cloudflare to Host subdomain on different hosting server.

 

Cloudflare’s DNS manager is more advance which will point your domain to the server with no or least minutes of main domain downtime.

 

So, how to add the domain on Cloudflare to manage DNS?

 

(Skip this part and move below the next image, if you already know how to add a domain on Cloudflare)

 

Adding Domain on Cloudflare (If you have not already added)

 

Go to Cloudflare and sign up for a new account, if you don’t have one. Then add your main domain on Cloudflare free plan. Save all the DNS records fetch by Cloudflare with proxy enabled.

 

After adding the main domain, Cloudflare will provide you to set its nameservers.

 

Go to the domain registrar’s dashboard and set the nameservers provided by Cloudflare and save it.

 

The nameserver propagation time varies from a few minutes to 72 hours.

 

After nameservers are successfully updated, which is verified by Cloudflare with tick mark now you can proceed to set a new DNS record that points to your subdomain hosting server.

 

 

 

Domain Verification Status on Cloudflare

 

Adding ‘A Record’ to Host a Subdomain on a Different Hosting Server

 

To add A record, click on the +Add record button. Under type make sure it is showing type “A”.

 

Now in the field of “Name” type the name of the subdomain you want to create and paste the subdomain server IP address in the field of IPv4.

 

You should fill the name area with “service” if you want to make your subdomain to appear “service.yourdomain.com”.

 

Setting A record on Cloudfare to Host a Subdomain on a Different Server

 

The next and important step is choosing between proxied and non-proxied proxy status. As of now, just disable it.

( I will tell when you have to enable proxy after a few more steps. )

Adding Subdomain on Subdomain Hosting Server.

This is the final step to host a subdomain on a different hosting server. Make sure that while checking A records for “service.yourdomain.com” on the DNS checker tool, it is showing your server IP resolving.

Now, to host the subdomain different server, log in to your server i.e cPanel of your hosting server to which you subscribed for the subdomain.

If you have subscribed hosting service especially for the subdomain, it might already contain your desired subdomain as the main domain.

If the hosting service you have subscribed to is for a different domain like mine, you can still add the subdomain in the same way a domain is added.
To add the subdomain as the main domain, there must be an option to add multiple domains.

If your hosting package is for a single domain, then contact the service provider and request to replace the main domain the plan was subscribed to with your desired subdomain. If they do so, your desired subdomain will be added to your server. Therefore you will not be required to read this post further.

If your hosting server is for multiple domains, go to the Domains or Addon Domains option on your cPanel.

Finding the area where you will need to add your subdomain as addon domain when you host a subdomain on different hosting server

Under Domain, click on the add a new domain option. Here, you will need to enter a subdomain (service example.com) in the field of Domain. Then, you must untick the option that suggests you share a directory with the main domain.

Adding subdomain as a Domain when you host a subdomain on a different hosting server.

When you untick the box, a new section will appear demanding a subdomain. In this field, you can enter anything.

In my case, grisma.com.np was the domain for which I purchased the hosting service. As I am currently not hosting this domain on this server I can add any subdomain in the subdomain field.

This will not work as a subdomain for grisma.com.np as I have not created A records for that servicexyz subdomain on grisma.com.np.

If your main domain of the server is hosted in the same server the subdomain entered here will redirect you to the subdomain want to host.

In simple words, servicexyz.grisma.com.np should be redirecting to service.grisma.xyz.

Now, just click on the SUBMIT button. In this way, you will be able to host a subdomain on a different hosting server.

Finally, open the subdomain on a browser, you will get a page similar to the following.

Checking the subdomain which is hosted on a separate hosting server.


Now, you can use this subdomain just like a domain and install anything you like with the help of App Installer or upload a static webpage.

I hope, this blog post helped you to Host a subdomain on a different hosting server.

If you have any confusion or you are facing difficulties to complete the procedure let me know in the comment section below.

ImportantIf your server where your subdomain is hosted does not provide an SSL certificate for free, use Cloudflare’s flexible SSL certificate by enabling proxy which I suggested disabling while adding “A Record”.

But, if your main domain is having SSL on the origin server and using strict SSL in Cloudflare then do not enable proxy and make it flexible which will impact your main domain security.

Therefore, get an SSL certificate for your subdomain and install it on the origin server, then make the “A record” proxied.

Summary of How to Host a Subdomain on a Different Hosting Server

  • Decide subdomain you want to create.
  • Find the server IP of server where you want to host the subdomain
  • Go to DNS manager for your domain (Domain registrar’s or Cloudflare or server where your main domain hosted)
  • Create DNS Record (A Record) with name “sub (if you want to make blog.domain.com then only enter blog in this field)” without main domain name and target with server IP of subdomain hosting server
  • Go to cPanel and add your domain as addon domain.

Leave a Comment