Forum Moderators: open

Message Too Old, No Replies

Can I host a domain and sub domain with two different hosts?

Is this possible?

         

vik_c

8:22 pm on Feb 13, 2006 (gmt 0)

10+ Year Member



Can I host a domain and sub domain with two different hosts? Say domain.com with host A and widget.domain.com with host B? Thanks.

Little_G

8:44 pm on Feb 13, 2006 (gmt 0)

10+ Year Member



Hi,

As far as I am aware this is not possible, a domain name has to resolve to one IP address, the subdomain is handled by the server.
As an alternative you can set up a virtual host (subdomain) on one of your servers and rewrite all requests to the second:


<VirtualHost *>
ServerName sub.domain.com
RewriteRule ^(.*) http://www.domain2.com$1 [L]
</VirtualHost>

I think that right anyway!

Andrew

inbound

1:17 am on Feb 14, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The DNS system allows for this, it's just a case of setting it up your nameservers correctly.

To illustrate the point think of sites that have www1.example.com, www2.example.com... These tend to be different machines running an identical webserving environment. Taking it one step further, mailservers are often separate machines from webservers.

There's no room for DNS 101 in a post here, and I wouldn't be the best to write that, a little Google research should bring up plenty of resources.