Re: DNS Question



DAve wrote:
Good morning.

I have been asked by my co-workers and sales why I always create a A record for new domains we host instead of a CNAME.

The issue I run into lately with some domains is that a client has a website with a industry host such as frank.relator.com and he wants to have DNS point www.frank.com to frank.relator.com with a CNAME. The client does not want an A record for frank.com.

Somewhere, in a class far far away, I was taught a DNS zone had to have a A record to function properly. I can't seem to locate anything in the RFCs.

Am I wrong?

Yes, you're wrong.

In terms of web service, you can use either an A record or a CNAME record
to provide the address part of a site's URL[*]. As far as the web server is
concerned, it looks for the 'Host=' line in the HTTP packet to decide what
name-based VHOST to dispatch the query to internally, and doesn't necessarily
do any DNS lookups at all. Web clients just do a gethostbyname(3) or getaddrinfo(3) call to resolve the site name into an IP, and anything supported by those (/etc/hosts, NIS, LDAP, DNS) will do the trick.

In terms of the DNS a 'Zone' is a delegated block of the name space under
a single administrative control. Typically with BIND this maps onto a single
'Zone file' containing all of the DNS resource records for the zone. The only records a zone *has* to have are:

* 1 SOA record, with the zone serial number

* Some number of NS records giving the nameservers for the zone.

It's perfectly permissible to have a zone that doesn't contain any A
records (or AAAA records) and in fact, reasonably common: reverse domains
generally contain mostly PTR records.

Cheers,

Matthew

[*] Possibly others, but A and CNAME are the vast majority. Being able to
use SRV for webservers would be cool.

--
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
Kent, CT11 9PW

Attachment: signature.asc
Description: OpenPGP digital signature



Relevant Pages

  • Re: Beating the spam filter ...
    ... touch on the matter agree that pointing an MX at a name that has a CNAME ... of abstraction for the host name of mx.hosting-company.tld such that they ... to a pool with out the need to update all the client DNS zones. ... It is dead wrong to have multiple CNAME records for one name. ...
    (comp.mail.sendmail)
  • Re: BIND Question...
    ... maintain all EXTERNAL DNS changes on the internal servers ... referring/delegating external hosts to the external dns server). ... know i had to create a zone for each host. ...
    (microsoft.public.windows.server.dns)
  • Re: Which zone is appropriate Primary, Secondary or Stub?
    ... local host "A" record on my W2K3 DNS to point to a local intranet. ... What type of zone do I create that won't interfere with internal ... to local web server 192.168.168.1 ...
    (microsoft.public.windows.server.dns)
  • Re: Stub zone and phantom CNAME
    ... One of the entries on the peoples DNS is for www for that zone. ... An NSlookup indicates that the www.abc.com is pointing to the the IP ... If we delete the CNAME in the cache everything starts working again. ...
    (microsoft.public.windows.server.dns)
  • Re: Beating the spam filter ...
    ... Now consider if you will the desire of the hosting company to have a level of abstraction for the host name of mx.hosting-company.tld such that they can freely move the SMTP service from host to host, or add additional hosts to a pool with out the need to update all the client DNS zones. ... Thus the hosting-company uses a CNAME for mx.hosting-company.tld to reference the back end SMTP servers that they want their clients to use at the time. ... It is perfectly reasonable to have multiple names with A records resolving to the same address. ...
    (comp.mail.sendmail)