Forum Moderators: phranque

Message Too Old, No Replies

Setup Sub-domain on a different host

         

kunwarbs

6:23 pm on Jul 19, 2009 (gmt 0)

10+ Year Member



how do I setup a sub-domain on a different host?

eg. I have my website www.example.com hosted on host A while I want to set up subdomain.example.com hosted on host B

Can this be done by doing something on domain control panel? please suggest.

Note: I want to host the sub-domain on a different host so that in case my main website is down because of any server issues, my visitors are still able to get updates from the subdomain hosted on the other server

creeking

11:43 pm on Jul 19, 2009 (gmt 0)

10+ Year Member



your nameservers are the key.

what nameservers are you using? registrar or webhost or 3rd party ?

kunwarbs

7:49 am on Jul 26, 2009 (gmt 0)

10+ Year Member



I am using custom nameservers i.e. mapped with webhost

ns1.domain.com
ns2.domain.com

encyclo

5:11 pm on Jul 26, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You will need to edit the DNS zone file to include entries for the subdomain, either with a host record pointing to the IP address of the second server, or (sometimes simpler), see if the second hosting company gives you a subdomain under their own domain, then use a CNAME alias referring to that subdomain.

Host (A) record:

subdomain IN A 123.2.33.45.

CNAME alias:

subdomain IN CNAME sub.example.com.

(where example.com is the second hosting company's domain)

Don't forget to use the trailing period at the end as shown in the examples above, otherwise it won't work. The specific details of how to edit the zone file depend on what DNS server and/or control panel you are using.