I have a bank as my client. They have their internet banking website hosted on one server and corporate website they want to host on a different server, because the vendors managing them are different. Can they use the same domain name (example.com
) with different sub domains, to give their customers access to these two sites - like retailbank.example.com
for internet banking and www.example.com
for corporate website. How can this be done in the simplest way?

- 79,770
- 20
- 184
- 232

- 13
- 1
- 3
1 Answers
Yes. Having different hosts behind different fully-qualified domain names (FQDNs) is fine, notwithstanding that the FQDNs are in the same domain. See, for example, my main web server, and my monitoring server, which are under the same domain but are on different hosts in different countries:
www.teaparty.net. 3600 IN A 178.18.123.145
nagios.teaparty.net. 3600 IN A 78.47.197.131
Edit you ask where the setting is done. In the DNS, define both A records, each pointing to the relevant IP address. In each server's service configurations (at least for hostname-aware services) tell it which FQDN it should be serving.
Edit 2: on whichever nameservers are authoritative for your domain, let's say those for example.com
, you define www.example.com
to point to the IP address of the corporate webserver, and retailbank.example.com
to point to the IP address of the internet banking server. Given your comment below, where you say you got the domain from GoDaddy, you would set these in GoDaddy's control panel for that domain.
You configure the corporate webserver to serve the appropriate site on www.example.com,
and you configure the internet banking server to serve the appropriate site on retailbank.example.com
.
Which DNS servers each of these two web servers uses for its DNS lookups is not material; each should use whichever servers are appropriate for its hosting.

- 79,770
- 20
- 184
- 232
-
Sounds good. Where exactly is this setting done? – Ross Cooper Dec 19 '16 at 13:25
-
@RossCooper in your customers DNS, you should be able to inform them about that. – Orphans Dec 19 '16 at 15:21
-
Since my customer has two apps hosted with two different vendors/servers/datacenters, what exactly does the "Customer's DNS" mean? – Ross Cooper Jan 05 '17 at 14:57
-
@RossCooper they only have the one domain name, you specified that in the question. However the customer has provisioned DNS service for that domain name, that is how they'll need to make these changes. Each hostname-aware service will also need to be configured to serve the relevant FQDN. – MadHatter Jan 05 '17 at 15:05
-
Yes, the domain name is one. So if I have bought the domain from GoDaddy, shall I mention the nameservers of both providers in their DNS setting? As well as, DNS of both vendors will have to be updated with the subdomains they are going to use? – Ross Cooper Jan 05 '17 at 15:38
-
@RossCooper sorry, what? There are about three different misapprehensions in that question, possibly more. I've made a more concrete edit above, addressing the specific case you put in your question. If things are still unclear, you really need to consult a professional. – MadHatter Jan 05 '17 at 16:26