6

Simailar to this question, I want to configure DNS hosted with GoDaddy to have a subdomain on a different IP from the root site. The issue I am having is that GoDaddy uses a GUI and does not grant direct access to bind (that I can see).

When I enter an name for the A record (i.e. Server2), the ui allows it. But when I try to point the subdomain's CNAME record to Server2, it tells me its an invalid host name.

What am I missing here?

Rob Allen
  • 551
  • 1
  • 6
  • 11

3 Answers3

8

You only need an A record in order to host a subdomain. A CNAME record is basically an Alias. For example, www records are usually CNAME records to the root domain, as they are generally the same page.

GoDaddy offers total DNS control and definately has the capability to do this.

Even in bind, to host a subdomain at IP different than your main site, the records would look something like this:

; Main Site
@  IN A  192.168.1.1
www IN CNAME  mysite.com.

; Blog
blog IN A 192.168.1.2
Kyle Smith
  • 9,683
  • 1
  • 31
  • 32
  • @Kyle - I have defined the second server as a A record called Server2. When I attempt to point the CNAME to the new A record, Total DNS control says its not a valid host – Rob Allen Oct 18 '09 at 17:19
  • I just logged into my GoDaddy Total DNS control panel and tested this. Creating the CNAME takes a hostname you want for the CNAME (this is just the subdomain portion, like 'blog') and a fully qualified domain name it should point to ('web2.myserver.com'). Although real DNS records should end in a period ('web2.myserver.com.'), GoDaddy wants just an FQDN, which it will add a trailing period to. Worked like a charm! Good luck. – Kyle Smith Oct 18 '09 at 18:49
  • @kyle, that worked for me as well. – Rob Allen Oct 19 '09 at 01:32
1

If you really want to create a subdomain, with servers named like "www.subdomain.roballen.com", as opposed to "server1.roballen.com", "server2.roballen.com" etc (which are just regular host names in your domain, not subdomain, and have been covered by the first two answers), then you need:

  • Set up DNS servers for "subdomain.roballen.com"
  • In roballen.com, add NS records pointing to these newly set up servers:

subdomain IN NS ns1.subdomain.roballen.com.
subdomain IN NS secondary.externalhosting.com.

  • If, in step 2, you specified server names in subdomain.roballen.com (like the first server above), then you need to create glue records:

ns1.subdomain IN A 1.1.1.1

Max Alginin
  • 3,284
  • 15
  • 11
0

You need to make sure that you are pointing it to the correctly written A-record.

www => mydomain.com.

Notice that there is a dot after mydomain.com or else it won't work.

sybreon
  • 7,405
  • 1
  • 21
  • 20