This article will walk you through the process of pointing a subdomain to a different server to the one your primary domain is pointing to. This process will work for pointing a primary or TLD domain to a new or different server. Pointing your subdomain to a different server will mean, when a user navigates to your subdomain URL, i.e. shop.yourdomain.com, they will be delivered the content on the new server you have specified.
Different types of configuration
Here are 3 common types of configuration you could setup when pointing subdomains to a different server. All 3 types can be achieve with the how-to steps below. You are of course not limited to these setups, but they will give you an idea of what you can achieve with subdomains.
Option 1:
- domain is registered with Cian’s Web Hosting
- primary domain points to a Cian’s Web Hosting server
- subdomain points to a different hosting provider’s server
Option 2:
- domain is registered with Cian’s Web Hosting
- primary domain points to a Cian’s Web Hosting server
- subdomain points to Cian’s Web Hosting server
Option 3:
- domain is registered with Cian’s Web Hosting
- primary domain points to a different hosting provider’s server
- subdomain points to a different hosting provider’s server
Here is an example of how someone may use a subdomain;
Your primary domain is: www.yourdomain.com
Your subdomain is: www.shop.yourdomain.com
Say for example, www.yourdomain.com hosts your WordPress blog website content, and you want to create an online store using Magento. You could then setup www.shop.yourdomain.com with new server space, completely partitioned off from your WordPress site. This could be done using 2 different servers/IP addresses provided by Cian’s Web Hosting or from 2 different providers
Example setup using two servers from Cian’s Web Hosting
www.yourdomain.com WordPress hosted by Cian’s Web Hosting
www.shop.yourdomain.com Magento hosted by Cian’s Web Hosting
OR
Example setup using a server from Cian’s Web Hosting and a server from a different provider
www.yourdomains.com WordPress hosted by Cian’s Web Hosting
www.shop.yourdomain.com Magento hosted by ABC Web Host
Why create a subdomain?
Here are a few reasons why you might want to create a subdomain and then point it to another server. Noting the server could be supplied by the same hosting provider or a completely different provider.
Security
Avoiding a cyber-attack and/or reducing the damage to your business may be of great concern to you. By separating different parts of your online business across different servers may reduce the damage of an attack. Websites are vulnerable to hackers, if you have, for example, your blog and your online shop on different servers, if one is attacked and the website goes down. The other will be unaffected and still running. If both your blog and your online store are hosted on the same server, a single attack could bring both down. Additionally the more entry points and users you have the more open you are to cyber-attacks, partitioning your systems over different servers will reduce the impact of a successful attack.
Separate Functionality
Maybe you’ve been running a blog and want to start selling products using an online store. It may be too difficult or risky to redesign your whole blog to incorporate an online shop. Instead of rebuilding your entire site, a great alternative would be to use a subdomain for your eCommerce site, for example shop.yourdomain.com
The same could be true if you want to specifically separate out a feature of your online business, say for example a web app or knowledgebase. You might need specific servers or software for these large pieces of functionality. Using a subdomain would be a perfect way to segregate different parts of your online business and tech.
Reliability
Once your website starts to pick up steam and you are generating lots of traffic, you might want to consider a subdomain to help with load balancing your bandwidth. If you are getting so much traffic for the eCommerce side of your website, you might think about creating a subdomain. For example shop.yourdomain.com. You might also consider breaking out different categories of your blog into subdomains. If you have an international cooking blog, you could break content out into countries. For example, french.cooking.com, japanese.cooking.com
Host clients websites
If you’re a web developer, then your clients will probably want to see how their website is going as you build it. Using a subdomain gives you the option to build in a separate environment away from the main traffic of the primary domain. Iterative design and build practices gives your client the ability to see and play around with their website and get the perfect product, before you even finish it.
Just playing around with a new idea or need space for a demo site? A subdomain pointing to a separate server would be a wonderful option. This would allow you to experiment without the risk of endangering your production software/site.
Testing or Staging Environment
Before you release a change to your website to the live version (production), it is best to launch it in a testing environment. If you aren’t doing this on a local machine or in a cloud dev environment like GitHub. Using a subdomain might be a good option. It would also be possible to tell search engines not to index the pages and even put a password on the site, so unwanted eyes are spying on your latest creation.
How to point a subdomain to a different server?
Prerequisite: You have already created a subdomain.
See our article: What is a subdomain? How do I create a subdomain?
Step 1: Get your IP address
You can retrieve your IP address from the following options.
Option 1: Welcome email
Option 2: Client account
Option 3: cPanel
Step 2: Change name server via your current registrar
If your domain is registered to a provider other than Cian’s Web Hosting, you will need to perform this step with them. If your domain is registered with Cian’s Web Hosting, you can perform this via your client account.
- Log into your client account
- Select Products
- Under the domain section , you should see your domain listed
- Locate your domain from that section, then click the DNS button
- Go to the Nameserver section
- Click Change
- Choose the option enter my own nameservers
- Enter your two Cian’s Web Hosting name servers
- Click save to confirm changes
- Your Cian’s Web Hosting nameservers will now undergo the propagation phase, which may take 24 to 48 hours to complete.