What are these words?
A domain is the name of your website, like example.com. A subdomain is a smaller name in front of it, like blog.example.com.
DNS is like a phone book for the internet. It tells computers which server holds each name. An A record is one line in that phone book. It connects a name to an IP address, which is the number of a server.
The main domain and its subdomain have separate lines. So each can point to a different server.
What you need
- The IP address of the server for the main site.
- The IP address of the server for the subdomain. Your welcome email or the hosting company will have it.
- Access to the place where your DNS is managed.
Steps
- Log in to your DNS manager. If your domain is with Hostvento, log in at https://secure.hostvento.com/clientarea.php.
- Open the Domains menu and find your domain.
- Open the DNS settings. This may be called Manage DNS or DNS Management. If your DNS is in cPanel, use Zone Editor instead.
- Find the A record for the main name (
example.com). Make sure it holds the IP of the main server. - Add a new A record for the subdomain. Set the name to
blog(or your chosen word). - In the value or address box, type the IP of the second server.
- Save the changes.
Set up the second server
- On the second server, add the subdomain in the control panel. In cPanel, use Domains or Subdomains.
- Upload your site files to the folder it makes.
If the second server does not know the subdomain, visitors will see an error or a default page.
Wait and test
DNS changes can take a few hours to spread. Sometimes it is quicker. After that, open both addresses in your browser. Each should show its own site.
Quick recap
- A subdomain has its own DNS line, so it can live on another server.
- Add an A record for the subdomain with the second server's IP.
- Add the subdomain on the second server too.
- Wait for DNS to spread, then test both sites.