{"id":24885,"date":"2026-10-10T11:33:29","date_gmt":"2026-10-10T07:33:29","guid":{"rendered":"https:\/\/www.hostking.host\/blog\/how-to-add-txt-record-dns\/"},"modified":"2026-10-16T08:49:35","modified_gmt":"2026-10-16T04:49:35","slug":"how-to-add-txt-record-dns","status":"publish","type":"post","link":"https:\/\/www.hostking.host\/blog\/how-to-add-txt-record-dns\/","title":{"rendered":"How to Add a TXT Record to Your DNS: A Step-by-Step Guide"},"content":{"rendered":"<p><strong>To add a TXT record to your DNS, log in to wherever your domain&#8217;s DNS is managed, open the DNS records section, create a new record, set the type to TXT, add the host and value you were given, then save and wait for it to propagate.<\/strong> This is the process behind most common tasks for small business owners: verifying a domain with Google Search Console, setting up business email, or proving ownership to an SSL or Microsoft 365 provider.<\/p>\n<p>The exact menu names differ between registrars and hosting panels, but the underlying steps are the same everywhere. This guide walks through each one, explains the formatting rules that trip people up, and lists the mistakes that cause verification or email delivery to fail.<\/p>\n<h2>What is a TXT record?<\/h2>\n<p>A TXT record (short for &#8220;text record&#8221;) is a type of DNS record that attaches a piece of text to your domain or a subdomain. DNS is the system that translates your domain name into the technical details other computers need, such as where your website or email lives.<\/p>\n<p>A TXT record doesn&#8217;t make anything happen by itself. It simply stores information that another service can look up and read. Common uses include:<\/p>\n<ul>\n<li><strong>Domain ownership verification<\/strong> \u2014 proving to Google Search Console, Microsoft 365, Google Workspace, or an SSL certificate provider that you control a domain.<\/li>\n<li><strong>Email authentication<\/strong> \u2014 publishing SPF, DKIM and DMARC policies so that mail servers know which systems are allowed to send email on your behalf, and how to handle mail that fails those checks.<\/li>\n<li><strong>Automated certificate checks<\/strong> \u2014 services like Let&#8217;s Encrypt can use a TXT record to confirm you own a domain before issuing a certificate.<\/li>\n<\/ul>\n<p>You can have several TXT records on the same domain at once, each serving a different purpose. For a wider look at other record types, see this guide to <a href=\"https:\/\/www.hostking.host\/blog\/dns-records-explained-a-ns-mx-cname-svr-and-cname-records\/\">DNS records explained: A, NS, MX, CNAME and SRV records<\/a>.<\/p>\n<h2>Steps to add a TXT record to your DNS<\/h2>\n<p>Here is the generic process. Wording varies by provider, but every DNS management panel asks for the same pieces of information.<\/p>\n<ol>\n<li><strong>Get the exact value you need to add first.<\/strong> This comes from whichever service is asking for it \u2014 for example, Search Console will show a string like <code>google-site-verification=xxxxxxxxxxxxxxxx<\/code>, or your email provider will give you an SPF or DKIM string. Copy it exactly as shown.<\/li>\n<li><strong>Log in to wherever your DNS is managed.<\/strong> This is usually your domain registrar or your web hosting provider, depending on where your domain&#8217;s nameservers point. If you&#8217;re not sure which one controls your DNS, check your domain registration confirmation email or ask whoever set up your website.<\/li>\n<li><strong>Find the DNS records section.<\/strong> It may be labelled DNS Management, Zone File, Name Server Management, or Advanced DNS Settings.<\/li>\n<li><strong>Add a new record and set the type to TXT.<\/strong><\/li>\n<li><strong>Fill in the Name\/Host field.<\/strong> Use <code>@<\/code> to place the record on the root domain (e.g. example.com). For a subdomain-specific record, enter the prefix \u2014 DMARC records, for example, always use the host <code>_dmarc<\/code> (so <code>_dmarc.example.com<\/code>), while DKIM records use a selector provided by your email service, such as <code>selector1._domainkey.example.com<\/code>.<\/li>\n<li><strong>Paste the value into the Value\/Text\/Content field.<\/strong> Do not add quotation marks around it yourself \u2014 DNS panels sometimes display values in quotes, but those quotes are just for readability and shouldn&#8217;t be typed in.<\/li>\n<li><strong>Set the TTL (Time to Live) if asked.<\/strong> This controls how long the record is cached by other servers before they check for updates. Defaults are often 3600 seconds (one hour); if you&#8217;re unsure, leave it at the default.<\/li>\n<li><strong>Save the record.<\/strong><\/li>\n<li><strong>Wait for propagation, then verify.<\/strong> Changes to DNS aren&#8217;t instant everywhere at once. Most updates are visible within a few minutes to a few hours, though it can occasionally take up to 24\u201348 hours. Once enough time has passed, go back to the service that asked for the record and click its &#8220;verify&#8221; button.<\/li>\n<\/ol>\n<h3>Where to find the DNS records section<\/h3>\n<p>Providers use different names for the same screen. This table shows the common variations so you know what to look for regardless of who manages your domain.<\/p>\n<table>\n<tr>\n<th>What it&#8217;s called in this guide<\/th>\n<th>Common label variants you might see<\/th>\n<\/tr>\n<tr>\n<td>Record type<\/td>\n<td>Type<\/td>\n<\/tr>\n<tr>\n<td>Host\/subdomain field<\/td>\n<td>Name, Host, Record name<\/td>\n<\/tr>\n<tr>\n<td>Content field<\/td>\n<td>Value, Text, Answer, Data, Content<\/td>\n<\/tr>\n<tr>\n<td>Cache duration<\/td>\n<td>TTL (Time to Live)<\/td>\n<\/tr>\n<\/table>\n<p>If you manage your website through a hosting account, this is often the same place you&#8217;d manage other DNS settings. Our <a href=\"https:\/\/www.hostking.host\/blog\/understanding-web-hosting-a-beginners-guide\/\">beginner&#8217;s guide to web hosting<\/a> explains how hosting, domains and DNS fit together if any of this terminology is new.<\/p>\n<h2>Using TXT records for domain verification<\/h2>\n<p>Domain ownership verification is one of the most common reasons small business owners need to touch DNS. Services such as Google Search Console, Microsoft 365 and various SSL certificate providers ask you to add a specific TXT record so they can confirm you control the domain, rather than someone else.<\/p>\n<p>For Google Search Console specifically, when you choose to verify a &#8220;Domain&#8221; property, Search Console gives you a string that looks like:<\/p>\n<p><code>google-site-verification=6P08Ow5E-8Q0m6vQ7FMAqAYIDprkVV8fUf_7hZ4Qvc8<\/code><\/p>\n<p>You add this as a TXT record on your root domain (host <code>@<\/code>), save it, then return to Search Console and click verify. You can usually leave this record in place permanently, since removing it may cause you to lose verification later.<\/p>\n<h2>Using TXT records for email authentication (SPF, DKIM, DMARC)<\/h2>\n<p>If you send business email from your domain, TXT records are also how you publish rules that help prevent spoofing and improve deliverability. These rules are part of good <a href=\"https:\/\/www.hostking.host\/blog\/protect-your-business-from-phishing-email-security\/\">email security practice for small businesses<\/a>.<\/p>\n<h3>SPF (Sender Policy Framework)<\/h3>\n<p>An SPF record lists which mail servers are allowed to send email for your domain. It&#8217;s added as a TXT record at the root of your domain and looks something like:<\/p>\n<p><code>v=spf1 ip4:192.0.2.0\/24 ip4:198.51.100.123 ip6:2620:0:860::\/46 a -all<\/code><\/p>\n<h3>DKIM (DomainKeys Identified Mail)<\/h3>\n<p>DKIM adds a digital signature to outgoing mail so receiving servers can confirm it wasn&#8217;t altered in transit. The TXT record is published at a selector address given to you by your email provider, for example:<\/p>\n<p><code>selector1._domainkey.example.com<\/code> containing a value such as <code>k=rsa;p=...<\/code><\/p>\n<h3>DMARC (Domain-based Message Authentication, Reporting &amp; Conformance)<\/h3>\n<p>DMARC tells receiving mail servers what to do with messages that fail SPF or DKIM checks, and where to send reports. It&#8217;s always published at the <code>_dmarc<\/code> subdomain, for example <code>_dmarc.example.com<\/code>, with a value like:<\/p>\n<p><code>v=DMARC1;p=none;sp=quarantine;pct=100;rua=mailto:dmarcreports@example.com;<\/code><\/p>\n<p>If you&#8217;re setting up a new mailbox, our guide on <a href=\"https:\/\/www.hostking.host\/blog\/how-to-create-a-free-business-email-address\/\">creating a free business email address<\/a> covers the basics before you get to authentication records.<\/p>\n<h2>Formatting rules that matter<\/h2>\n<p>A few technical rules apply to every TXT record, regardless of provider:<\/p>\n<ul>\n<li><strong>255 characters per string.<\/strong> Each individual string in a TXT record can hold a maximum of 255 characters. Longer values (common with DKIM keys) are automatically split into multiple quoted strings that get read together \u2014 your panel usually handles this for you.<\/li>\n<li><strong>ASCII characters only.<\/strong> Avoid special characters, emoji or non-English characters in the value.<\/li>\n<li><strong>Don&#8217;t type quotation marks yourself.<\/strong> Panels often display the saved value in quotes for readability; this is not part of the actual value you should type in.<\/li>\n<li><strong>Watch the Name field syntax.<\/strong> Periods are allowed inside the name but not at the very start or end, and you can&#8217;t use consecutive periods or start\/end with a hyphen.<\/li>\n<\/ul>\n<h2>Common mistakes to avoid<\/h2>\n<p>Most problems with TXT records come down to one of these:<\/p>\n<ul>\n<li><strong>Adding a second SPF record instead of merging.<\/strong> A domain should have only one SPF record. This frequently goes wrong when switching email providers: the old SPF record is left in place and a new one is added alongside it. Receiving mail servers can&#8217;t tell which one to trust, and this often causes a PermError that hurts deliverability. If you already have an SPF record, add the new provider&#8217;s requirement into the existing one rather than creating a second record.<\/li>\n<li><strong>Leaving stray quotation marks in the value field.<\/strong> This changes the actual text being published and can break verification.<\/li>\n<li><strong>Using the wrong host.<\/strong> DMARC always goes on <code>_dmarc<\/code>, DKIM always includes the selector given by your provider, and SPF goes on the root domain (<code>@<\/code>) unless told otherwise. Mixing these up is a common cause of failed checks.<\/li>\n<li><strong>Checking too soon.<\/strong> DNS changes take time to spread across the internet. If verification fails immediately after saving, wait a while and try again before assuming something is wrong.<\/li>\n<\/ul>\n<h2>FAQ<\/h2>\n<h3>How do I add a TXT record to DNS if I don&#8217;t know who manages it?<\/h3>\n<p>Check your domain registration confirmation, or look at your domain&#8217;s nameservers (your registrar&#8217;s account area will usually show these). Whoever&#8217;s nameservers are listed is where your DNS, and therefore your TXT records, need to be managed.<\/p>\n<h3>How long does a TXT record take to work after I add it?<\/h3>\n<p>Most changes are visible within a few minutes to a few hours. In rarer cases it can take up to 24\u201348 hours for the change to be visible everywhere. If verification fails right after saving, wait a bit longer before trying again.<\/p>\n<h3>Can I have more than one TXT record on the same domain?<\/h3>\n<p>Yes, you can have multiple TXT records at the same host, each used for a different purpose \u2014 for example, one for Google site verification and one for DMARC. The exception is SPF: a domain should only ever have one SPF-starting TXT record, with all required entries merged into it.<\/p>\n<h3>Do I need to remove old TXT records once I&#8217;ve finished verifying?<\/h3>\n<p>It depends on the service. Some, like Google Search Console domain verification, ask you to leave the record in place permanently so verification doesn&#8217;t get revoked later. Others, such as a one-time SSL certificate check, can be safely removed once the certificate is issued. If you&#8217;re not sure, leaving it in place generally does no harm.<\/p>\n<p>&lt;<br \/>&gt;<br \/>\n<br \/>\nAn isometric illustration of a browser window showing a DNS settings panel with a text record field, a key icon, and a checkmark shield, next to a small envelope representing email.<br \/>\nIllustration of a DNS management panel with a TXT record being added for domain verification and email authentication<br \/>\ndns settings domain verification<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A plain-English, step-by-step guide to adding a TXT record to your DNS, covering domain verification and email authentication setups like SPF, DKIM and DMARC.<\/p>\n","protected":false},"author":3,"featured_media":24884,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"hk_meta_description":"Learn how do I add a TXT record to DNS, step by step, to verify domain ownership or set up SPF, DKIM and DMARC for email authentication.","hk_noindex":false,"footnotes":""},"categories":[218],"tags":[189,190,191,192,193],"class_list":["post-24885","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-domains-dns","tag-dns","tag-domain-names","tag-email-authentication","tag-spf-dkim-dmarc","tag-website-security","entry"],"hk_builder":"","_links":{"self":[{"href":"https:\/\/www.hostking.host\/blog\/wp-json\/wp\/v2\/posts\/24885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostking.host\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostking.host\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostking.host\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostking.host\/blog\/wp-json\/wp\/v2\/comments?post=24885"}],"version-history":[{"count":1,"href":"https:\/\/www.hostking.host\/blog\/wp-json\/wp\/v2\/posts\/24885\/revisions"}],"predecessor-version":[{"id":24923,"href":"https:\/\/www.hostking.host\/blog\/wp-json\/wp\/v2\/posts\/24885\/revisions\/24923"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostking.host\/blog\/wp-json\/wp\/v2\/media\/24884"}],"wp:attachment":[{"href":"https:\/\/www.hostking.host\/blog\/wp-json\/wp\/v2\/media?parent=24885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostking.host\/blog\/wp-json\/wp\/v2\/categories?post=24885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostking.host\/blog\/wp-json\/wp\/v2\/tags?post=24885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}