Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu May 24, 2007 2:21 am 
Offline
Senior Member
User avatar

Joined: Wed Jan 24, 2007 12:04 am
Posts: 90
Website: http://www.smiffysplace.com
Location: Rural South Australia
If I have domain foo.bar, I am unable to specify a CNAME for foo.bar (no A record) - the error is that I am trying to create .foo.bar (note the initial dot).

I'm am trying to catch both www.foo.bar and foo.bar, pointing them to the same place. (This allows me to change just one record if my primary Linode goes down, to put everything I host onto my secondary.)

I was under the impression that it was possible to alias the base domain in this way - in fact I'm pretty sure that I've actually done it before through Zoneedit.

So, who's wrong - me or the software?


Top
   
 Post subject:
PostPosted: Thu May 24, 2007 8:24 am 
Offline
Newbie

Joined: Thu Mar 15, 2007 10:22 pm
Posts: 3
ICQ: 148044975
Website: http://opello.org/
WLM: opello_1@hotmail.com
Yahoo Messenger: opello
AOL: opello2k
Location: Brandon, SD
You should probably make "foo.bar" an A record with the desired IP. Then CNAME "www.foo.bar" to "foo.bar". However, the recommendation I've seen is to make them both A records, to prevent an extra lookup when people use the www name.

_________________
Dan
opello


Top
   
 Post subject:
PostPosted: Thu May 24, 2007 6:27 pm 
Offline
Senior Member
User avatar

Joined: Wed Jan 24, 2007 12:04 am
Posts: 90
Website: http://www.smiffysplace.com
Location: Rural South Australia
Thanks for your reply.

The issue here is that I have a large number of domains that might need to change IP at a moments notice - all from one single IP to another IP.

This is why I have a single A record, andreas.bar.baz. I then make all the www.foo.bar, www.bing.bong, www.niddle.naddle, etc., records point to andreas.bar.baz. Then, when the machine with the IP pointed to by andreas.bar.baz goes down big time, I just change the andreas.bar.baz A record (which should have a short TTL) to the IP address of my backup server. This means that I make ONE DNS change to get all my sites up on the other machine.

Very few of my domains really need A records as the www's CNAME to one host on another domain with MX records pointing to other hosts on that other domain.

Could it be that the way that way DNS is done is based on practices that have been since superseded?

In this day and age, I don't see two hits on my DNS per lookup being a big deal. Hey, I make up to three DNS hits on every mail coming into my system (DNSBL, SPF). So, I'm aware of the old thing of making both the bare domain and www.foo.bar have A records, but don't really think that it is as relevant on the modern Internet. (That's the Internet we've got at the moment, not the one that gets trashed by a hobo's discarded cigarette butt ;-)


Top
   
 Post subject:
PostPosted: Fri May 25, 2007 12:52 pm 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
smiffy wrote:
This is why I have a single A record, andreas.bar.baz. I then make all the www.foo.bar, www.bing.bong, www.niddle.naddle, etc., records point to andreas.bar.baz.


This is fine; you can do that. It works.

But what you can _not_ do is have "bar.com" or "bong.com" or "naddle.com" be CNAMES for andreas.bar.baz - that won't work. www.bar.com, fine; bar.com no.

The domain needs to have an SOA record. You can't have a CNAME and other records at the same time.

If I was doing this on my own DNS server then I'd make all the zone files be the same file. eg
Code:
zone "bar.baz" {
        type master;
        file "mystuff";
};

zone "bleh.meh" {
        type master;
        file "mystuff";
};


And "mystuff" can contain an A record for the zone (@ IN A 1.2.3.4) and www IN A 1.2.3.4 so changing the DNS is simply changing one file and reloading the zones.

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
 Post subject:
PostPosted: Fri May 25, 2007 6:52 pm 
Offline
Senior Member
User avatar

Joined: Wed Jan 24, 2007 12:04 am
Posts: 90
Website: http://www.smiffysplace.com
Location: Rural South Australia
Thanks. Think I understand it now - I was dreading having to re-read "DNS and BIND" because I really didn't want to spend the weekend with a migraine ;-)

As I'm using the Linode DNS (and ZoneEdit elsewhere) rather than running my own, the file option isn't really open to me. Handy to know, though. One day when I'm feeling brave, I might consider setting up DNS on my two Linodes.

For now, I will just set up A records pointing to the IP of my primary Linode for the bare domains. My Web servers are set up to redirect the bare domains to the appropriate www. or whatever, so it would be no great problem if the bare domains pointed to non-operating IPs, as nobody should be using them anyway!

Thanks again for the clarification.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group