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
TXT records can contain freeform text of any type. They are generally used by service providers as well as email services to verify domain ownership.
TXT Record Uses
- Service providers can use TXT records to verify domain ownership.
- SPF Records help to reduce SPAM.
- DomainKeys Identified Mail (DKIM) is a method for associating a domain name with an email message, thereby allowing a person, role, or organization to claim some responsibility for the message.
-
0:00
The next type of record that we're going to talk about is the TXT or text record.
-
0:05
The text record can contain free form text of any type.
-
0:10
Service providers can use this to verify domain ownership.
-
0:14
You may have signed up for a site that asks you to put in a special type of text record in your domain.
-
0:21
The service provider will then look that up to make sure that you indeed own the domain.
-
0:26
There are some special types of TXT records.
-
0:29
They're used for different things.
-
0:31
One of these is called SPF or sender policy framework.
-
0:36
This tells you what kind of hosts can send and receive mail on your behalf.
-
0:43
When you're creating an SPF record, it deals with different mechanisms.
-
0:47
A plus means that the record will pass, a minus means that it will fail, a tilde means there will be a soft failure,
-
0:55
and a question mark is neutral.
-
0:59
The SPF text record also allows you to include other domains.
-
1:03
As an example, you might see this SPF record: v=spf1 include:_spf.google.com with a tilde and the word all.
-
1:16
What this means is that spf.google.com will manage sending email on your behalf.
-
1:24
This type of thing can be very useful when you're looking for email delivery.
-
1:29
Spam has become a big problem, so things like SPF and DKIM have been invented.
-
1:35
DKIM is another type of text record, and it stands for domainkeys identified mail.
-
1:42
What this is is a method for associating a domain name to an email message,
-
1:48
thereby allowing responsibility for the message to be claimed.
-
1:54
This is done by adding a DKIM signature field to the messages header.
-
1:59
That field is then verified against the DNS entry.
-
2:04
A lot of email delivery providers will help you to set up DKIM.
-
2:09
DKIM can help to ensure email delivery.
-
2:12
By using DKIM, email hosts can help to make sure that the emails are coming from who they say they're coming from.
-
2:20
It's one more way of fighting spam.
-
2:22
So now let's go ahead and take a look at adding a text record to our domain.
-
2:26
Now the first example I'm going to show you is going to be implementing an SPF record.
-
2:32
Now we could do this using text.
-
2:34
There is a newer SPF-type format, but not all DNS servers support that,
-
2:38
so we'll go ahead and just use a text record at first.
-
2:42
So if we were implementing SPF, I would say v=spf1 and then include_spf.google.com and then ~all.
-
2:58
Then we just click add record.
-
3:00
Now when you look at the records for teamtreehouse.com, you'll see that as a text record it's all the way at the bottom here.
-
3:11
So another thing that you might see text records used for is if you're setting up Google Apps,
-
3:16
it might ask you for domain name verification, and in that case you would just add a text record.
-
3:22
Again you can leave the name blank, and you would put in something like google-site-verification=
-
3:30
and then a ton of different letters and numbers. This is just an example.
-
3:37
Then click on add record.
-
3:39
Once again if you scroll down, you'll see that google-site-verification=that.
-
3:45
Now this is something that's done to prove domain ownership because if you don't own the domain
-
3:50
then you can't add text records to it.
-
3:53
Once again once you enter this, you don't need to keep it in there.
-
3:58
You can delete that once the external application has verified that you have entered that domain correctly.
-
4:06
This is going to be different for something like a text record with the SPF entry
-
4:10
because you always want that in there.
-
4:12
You always want other mail servers to know what your SPF entry is and who can send mail on your behalf.
You need to sign up for Treehouse in order to download course files.
Sign up