Basic DNS Record Types

Common Types Of DNS Records
With a basic knowledge of DNS, you know that different types of records are required to identify hosts and different types of services and attributes related to the domain. The most common types of DNS records used in most domains and their most common uses are described below.

A - Host - Usually used to associate a hosts name with an IPv4 address. For IPv6 see AAAA record later in this article.
MX - Mail Exchange - Used to identify mail servers that perform mail services for the domain.  
NS - Name Server - Identifies an authoritative DNS server for a particular zone.
PTR - Maps IP addresses to hosts for use in a reverse DNS lookup.
SRV - Service Locator - A general service record. Used generically instead of creating protocol specific records such as MX.

More Record Types
AAAA - IPv6 Host - Same as an A Record except it returns an IPv6 address.
CNAME - Canonical Name - Used to create an alias to reference one host by multiple names.
DNAME - Delegation Name - delegates an entire portion of a DNS tree under a new name not to be confused with CNAME which is for an individual name.
LOC - Location - Specifies a geographical location of a domain
SOA - Start of Authority - Contains authoritative information about a domain including: serial number which other servers for the zone can use to identify changes; primary name server; refresh to identify the interval to check for serial number changes; email of domain administrator; and other information.
SPF - Stores information relating to the SPF Protocol. SPF data can be stored in the type of record or in a TXT record.
TXT - Used to store various values such as SPF information.

There are more types of DNS records and their uses may be more than what has been explained here but those listed are well known and their most common uses.

Comments (9)

what are loc records used for?
I think it will be a funky record to add, but how is it practical in the real world?
can Google maps or something use it?


LOC are used to identify the location of a domain name.

You can read more at the Wiki or by googling the topic

I'm not sure if the Google Maps API directly supports this but it is certainly possible if the domain has the record
what I am asking is - how is that information useful other than to guys like me who think it's cool in a geekish kind of way?
I have a local website hosted on a server in the US, should I store my local co-ordinates there or the co-ordinates of the server?
Why? (Other than that it's cool and unusual)


Well its certainly not a required record type unless you have applications that support this. If you would like more input, I would suggest opening a question becuase maybe more experts might have an opinion or other information to share about this.

Without going into too much detail, here are a few uses I can think of
-If I were a search engine, I could use this information to lookup other nearby businesses to offer a an alternative or supplemental information.
-Allowing a company to dynamically view a worldwide IT infrastructure on a map(Generically of course).
-Advertising companies can use this data to serve ads more relevant to the host site
-With reverse DNS I might be able to more accurately geolocate my websites viewers on a map
-Applications could be extended to GPS, wifi, iPhone, etc.

I'm sure there are ways to do this alreayd without LOC data but its just an option.
Aard VarkPrincipal Engineer

Hopefully this comes across as constructive feedback because I'm in a rush :)

The article is too basic for anyone who knows anything at all about DNS and too basic for anyone who wants to learn anything about DNS and they would be best served looking elsewhere for information (Wikipedia, Google, etc).

CNAME: You should to explain this better. You can create mutliple A records to reference a host by many names as well.
DNAME: You should either elaborate on or provide working examples because anyone who has no experience with DNAME's will be no better off after reading this.
LOC: Why? I would not describe this as a common DNS record.

Maybe link off to a Wikipedia article or something which explains these and more types in detail if you're not going to actually write full article on DNS types.

View More

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.