Everything you wanted to know about DNS records but were afraid to ask
all credit for this goes to Miggyman who wrote such a nice post on DNS record types , I felt it needed recording for posterity.
please direct your gifts and admiration to him.
---------------------------------------------------
For those interested, your basic dns records are as follows
A = Address record, A records are used to map an IP address to a hostname or subdomain.
CNAME = Canonical name, a CNAME record refereces another record, effectivley making it an alias, normaly used to map a subdomain to an existing domain.
MX = Mail exchanger, an MX record specifies a mail server for the domain, normaly more than one will be specified and they will be given a priority to denote which server to try first (for backup mail servers etc)
NS = Name server, an NS record lists the DNS servers responsible for the domain, again more than one can and normaly is provided so if the primary server fails a backup can be used.
PTR = Pointer, a PTR record is used to resolve an ip address to a name, PTR records are what make reverse lookups work.
SOA = Start of authority, a SOA record contains a lot of the basic information about the domain relating to how updates should be handled, primary name server and contact detail.
And because im a nice guy.. you can all have a nice example zone file
- = SOA record = -
-------------------
@ IN SOA ns0.example.com. hostmaster.example.com. (
2005081701 ; Serial
10800 ; Refresh
3600 ; Retry
3600000 ; Expire
86400 ) ; Minimum
- = MX Record2 = -
-------------------
MX 5 mx1.example.com.
MX 5 mx2.example.com.
- = NS Records = -
------------------
IN NS ns0.example.com.
IN NS ns1.example.com.
- = A Records = -
----------------
@ IN A 999.888.777.666
cvs IN A 888.888.888.888
These effectivley map example.com to 999.888.777.666 (yes, i know it's invalid!) and cvs.example.com to 888.888.888.888.
It's worth noting this a record is special since the "@" means all destinations not setup in the zone file for this domain goto this, this is effectivley the "base" level of the dns.
- = CNAME Record = -
----------------------
www IN CNAME example.com.
This maps the www subdomain (yes, it is actualy a subdomain :O) to example.com, any changes made to the record for example.com automaticly filter back to www, www.example.com will go to 999.999.999.999, subdomains can basicly be pointed anywhere you want to point them
I've not listed a PTR record in this zone file because well, it wouldnt go in one, the PTR records would go into a zone file for the IP range as oppsed to the hostname, such a file would be named 777.888.999.in-addr.arpa and the PRT records would be specified using the last octet.
So for example.com we'd have a PTR record like this
666 IN PTR example.com.
This has been an InfoMiggy broadcast for the rubber chicken network
re: Everything you wanted to know about DNS records but were afraid to ask
Nice old thread. I'm pretty sure I didn't understand any of that :confused:
re: Everything you wanted to know about DNS records but were afraid to ask
For once, this is a good bump :)
Hadn't seen this thread before. Tis a good read.
re: Everything you wanted to know about DNS records but were afraid to ask
It is - and well worth its sticky status.
re: Everything you wanted to know about DNS records but were afraid to ask
I've read it a few times, and its still a good read.
How geeky am I, saying its a good read, I say the same about my CCNA Routing Protocols book!
re: Everything you wanted to know about DNS records but were afraid to ask
Quote:
Originally Posted by
Jonny M
Blast from the past, I'm going to post in this thread.
Is there anything wrong with not having a "www" entry? Is the redirecting of
Example Web Page to
Example Web Page done in Apache / web server of choice?
How can you have
caged.net work, but not
caged.net (if I read you right, setting @ in the A records would make every random sub domain entry work?
No, there's nothing stopping you from using just the root domain as a webserver, typically when you type (for e.g.) microsoft.com, either the browser can connect to it and gets a redirect to the www. address, or the domain host refuses the connection (because there's no httpd) and the browser automatically tries to prefix the address with www. to see if it has any better luck. However, that said, it's normally best practice to keep http and dns servers on logically or physically separate hosts, as a sort of security padding, but not particularly necessary, on some hosts it doesn't make a difference, depending on how it's set up, usually www. subhosts are just CNAMEs, or A's to a virtual nic, because it's cheaper.
re: Everything you wanted to know about DNS records but were afraid to ask
Just wondering...didn't you mean "were" instead of "where" in your thread name :P ?
".........know about DNS records but where afriad to ask"
other than that, thanks for this post :)
re: Everything you wanted to know about DNS records but were afraid to ask
Quote:
Originally Posted by
Kay-Q
Just wondering...didn't you mean "were" instead of "where" in your thread name :P ?
but thats just nit-picking...
if you followed the same lines then you'd have to pick out the 'afriad' in the title too :P
Re: Everything you wanted to know about DNS records but were afraid to ask
title changed to please the pedants. ;)
Re: Everything you wanted to know about DNS records but were afraid to ask
It may be worth also mentioning that the minimum TTL should be 43200. Having less than that can some times put you on blacklists such as SORBS.
Re: Everything you wanted to know about DNS records but were afraid to ask
Hi Admin
Not only Miggyman, but you also wrote very well about DNS.
I forgot to tell.. I am Nick Adam from NY. I am new to this forum and this is my first post.
Coming back with some cool stuff.
Nick
Re: Everything you wanted to know about DNS records but were afraid to ask
You missed a couple of record types, that people might increasingly see.
AAAA = ipv6 ip address
TXT = Text record.
SPF = Sender Policy Framework, this can also be done in a TXT record IN TXT "v=spf1 ...."
A full list of DNS record types, not for the faint of heart.
Re: Everything you wanted to know about DNS records but were afraid to ask
Re: Everything you wanted to know about DNS records but were afraid to ask
Thanks Moby-Dick. So what does the following mean:
MX 5 mx1.example.com.
MX 5 mx2.example.com.
I mean specifically the 5 before mx1.example.com and mx2.example.com. Many thanks, in advance.