This course will be retired on January 6, 2020.
Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Start a free Basic trial
to watch this video
DNS A Records map hosts names to IP addresses. These are the most common type of DNS records.
About A Records
- A records are the most common DNS records.
- A records map host names to IP addresses.
- An asterisk denotes a wildcard domain (e.g. *.jason.teamtreehouse.com would point to one server).
- The IPv6 version of an A record is called the AAAA record.
-
0:00
When one computer contacts a name server for information
-
0:03
a set of records is returned.
-
0:06
And we're going to start talking about the different types of records right now.
-
0:09
The first record that we're talking about is something called the A record.
-
0:13
This is the most common record that you'll see returned from name servers.
-
0:18
And what the A record does is maps host names to IP addresses.
-
0:23
For example, www.example.com would be mapped to an IP address
-
0:29
like 1.2.3.4.
-
0:32
Now there's no limit on the number of A record that you can have.
-
0:37
You can have something like www, mail, and also a ton more.
-
0:41
One thing that's interesting about A records
-
0:44
is that you can implement them using something called an asterisk,
-
0:48
which stands for a wild card record.
-
0:51
What this would specify is that any type of query going to a certain part of that domain name
-
0:57
would correspond to a particular IP address.
-
1:00
For example, if you put *.teamtreehouse.com
-
1:04
then a.teamtreehouse.com, b.teamtreehouse.com,
-
1:09
and so on, would all point to the same IP address.
-
1:13
This is how a lot of multi domain web applications work.
-
1:18
If you've used a web application that lets you have your own custom domain
-
1:22
generally what they'll have is a wild card entry pointing to a specific server.
-
1:27
So let's go ahead and add an A record to our domain.
-
1:32
Now what you see here is a DNS hosting website called DNSimple,
-
1:37
and I am in the advanced editor for teamtreehouse.com.
-
1:42
Now this is not the actual DNS hosting
-
1:46
for teamtreehouse.com, this is just an example.
-
1:49
And we're going to see how to add an A record here.
-
1:51
So what we have here is a list of the different ns entries for teamtreehouse.com.
-
1:59
Now this is not what it is right now,
-
2:01
this is what it should be if we were actually hosting our DNS with DNSimple.
-
2:06
So you can disregard that.
-
2:09
So let's go ahead and add a record,
-
2:11
and I'm going to click the A record.
-
2:13
Now when I add an A record—
-
2:16
let's say I'll add Jason.teamtreehouse.com—
-
2:20
and you can see over on the right side of the screen here
-
2:25
it's going to say Jason.teamtreehouse.com resolves to,
-
2:30
and we don't have anything there just yet,
-
2:31
but when we enter the IP it would be listed right there.
-
2:36
Now then here we have the TTL or time to live,
-
2:41
and there are a few different options:
-
2:42
1 minute, 10 minutes, 1 hour, or 1 day.
-
2:45
And we can just leave it for 1 hour.
-
2:48
Now we'll see that that's in the list of the different records
-
2:51
on our teamtreehouse.com domain.
-
2:55
Now if we wanted to do a more complicated one
-
2:58
like a subdomain like hellojason—if we wanted
-
3:02
hello.jason.teamtreehouse.com
-
3:04
all we have to do is put a dot in between the words,
-
3:08
and as long as this is an acceptably formatted domain
-
3:11
it will work.
-
3:13
And again there is no limit on the IPs—
-
3:18
we're not confined to having only 1 IP per subdomain.
-
3:21
I'll go ahead and add that record as well.
-
3:24
Now if we wanted to add a wild card subdomain
-
3:27
we could do *.Jason.teamtreehouse—
-
3:31
and actually we don't need the .teamtreehouse there
-
3:34
now we'll do 1.2.3.4
-
3:38
now any single host name that we try to go to
-
3:42
under .Jason.teamtreehouse.com
-
3:45
will point to that particular IP address.
-
3:49
So hello.jason.teamtreehouse.com,
-
3:51
goodbye.jason.teamtreehouse.com—
-
3:53
anything that is an acceptably formatted domain
-
3:57
will hit that IP.
-
3:59
There is a very similar type of record to the A record
-
4:03
called a quadruple A record,
-
4:05
and this is the same thing as an A record
-
4:08
except it's for an IPv6 address.
-
4:11
IPv6 addresses can contain 2 more sets of information than a regular IP address,
-
4:18
and they're also the future of the internet.
You need to sign up for Treehouse in order to download course files.
Sign up