Run a website and its sub domain on 2 different web hosting providers?

Harry P

Well-known member
Registered
Joined
Feb 3, 2015
Messages
447
Points
28
I have a website and its sub domain but I want to run it on 2 different web hosting providers

i.e
example.com will run on a server hosting in US
example.com/sub-domain/ will run on a server hosting in UK

of course is main domain and sub-domain will run 2 different web systems. How can I setup that?

Any help and suggestions?
 

Localnode

Well-known member
Registered
Joined
Dec 15, 2015
Messages
333
Points
43
It's pretty simple:

1. Add an A record to DNS for subdomain;
2. Setup subdomain on a different server;

You'll have to add the A record through whichever registrar you registered the domain from (assuming you're using the registrars DNS).
Alternatively - if you're using your web hosts nameservers you can do this through cPanel (look for the Zone Editor function).
I recommend using Cloudflare for DNS because it makes these things easier and quicker (and it's free).
 

Harry P

Well-known member
Registered
Joined
Feb 3, 2015
Messages
447
Points
28

VirtuBox

Well-known member
Registered
Joined
May 3, 2016
Messages
1,622
Points
83
Hello @Harry P,
there is a small mistake in your question, because it seems you are not talking about subdomain, but about subfolder.

example.com -> domain
sub.example.com -> subdomain
example.com/subfolder/ -> subfolder

But to answer to your question, yes it's possible, but it will not be easy and it will require to setup a reverse-proxy to send requests on /subfolder/ to another web server.
So that mean, you need at least a VPS or dedicated server to be able to use a custom configuration on your web server.
 

Harry P

Well-known member
Registered
Joined
Feb 3, 2015
Messages
447
Points
28
example.com/subfolder/ -> subfolder
Yes it is what I wanted.
But to answer to your question, yes it's possible, but it will not be easy and it will require to setup a reverse-proxy to send requests on /subfolder/ to another web server.
So that mean, you need at least a VPS or dedicated server to be able to use a custom configuration on your web server.
I have already got a server for this website.
How to configure that?
 

hostnetindia

Well-known member
Registered
Joined
Apr 4, 2019
Messages
91
Points
8
Yes it can be happened. I have seen one of friend. He is running more than 2 subdomains and they all are different hosting platforms.
 
Recommended Threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top