How to Add a TXT Record
A step-by-step guide on how to add a TXT record.
How to Add a TXT Record to Your DNS
TXT records are incredibly versatile DNS records used for a variety of purposes beyond simply mapping domain names to IP addresses. They are crucial for tasks like verifying domain ownership for third-party services (e.g., Google Workspace, Microsoft 365) and, most importantly, for implementing email authentication protocols such as SPF, DKIM, and DMARC.
Adding a TXT record is a straightforward process, but the exact steps can vary slightly depending on your DNS provider. Below is a general step-by-step guide that applies to most common DNS management interfaces.
Step-by-Step Guide to Adding a TXT Record
Follow these instructions carefully to ensure your TXT record is added correctly.
-
Log in to Your DNS Provider's Control Panel: This is the first and most crucial step. Access the administrative interface provided by your domain registrar (e.g., GoDaddy, Namecheap, Cloudflare) or your hosting provider (e.g., AWS Route 53, DigitalOcean).
-
Navigate to the DNS Management Section: Once logged in, look for a section related to DNS management. Common labels include "DNS Management," "Zone Editor," "Manage DNS Records," "DNS Settings," or "Advanced DNS."
-
Select the Domain You Wish to Modify: If you manage multiple domains, ensure you select the specific domain for which you intend to add the TXT record.
-
Initiate Adding a New Record: Find an option to "Add Record," "Create New Record," or a similar button. This will open a form or a new row where you can input the details of your new DNS record.
-
Choose TXT as the Record Type: From the dropdown menu or list of record types, select "TXT."
-
Enter the Host/Name (or Subdomain):
- For most TXT records that apply to your main domain (like a general SPF record), you'll typically leave this field blank or enter
@(some providers use@to signify the root domain). - If the TXT record is for a specific subdomain (e.g.,
_dmarc.yourdomain.comfor DMARC, or a verification code for_google-site-verification.yourdomain.com), you will enter only the subdomain part here (e.g.,_dmarcor_google-site-verification). The provider's system will automatically append your main domain.
- For most TXT records that apply to your main domain (like a general SPF record), you'll typically leave this field blank or enter
-
Enter the Value/Text: This is the actual text string that the service you're setting up has provided. It must be entered precisely as given, including any quotation marks if specified. Examples include:
- SPF:
"v=spf1 include:_spf.google.com ~all" - Domain Verification:
"google-site-verification=youruniquecode"
- SPF:
-
Set the TTL (Time To Live): You can usually leave this at the default value (often 3600 seconds or 1 hour). If you need the change to propagate very quickly (e.g., during a critical migration), you might temporarily set it lower (e.g., 300 seconds or 5 minutes). Remember to revert it later if desired. Learn more about TTL.
-
Save the Record: Click "Save," "Add Record," "Create Record," or a similar button to apply your changes. Your DNS provider will then begin the process of updating its records.
Important Notes and Best Practices
Keep these considerations in mind when adding or modifying TXT records.
-
DNS Propagation: DNS changes are not instant. It takes time for these updates to propagate across the internet. You can use our DNS Propagation tool to monitor the status of your changes worldwide.
-
Accuracy is Key: Always double-check the TXT record value provided by the service you're integrating. Even a small typo can prevent the record from working correctly, leading to service disruptions or security vulnerabilities.
-
Multiple TXT Records: A domain can have multiple TXT records. However, for SPF, it's crucial to have only one SPF TXT record per domain to avoid issues. If you need to include multiple SPF mechanisms, combine them into a single record.
Pro Tip: After adding or modifying any DNS record, use a DNS lookup tool to verify that the record is correctly published and resolving as expected. This helps catch errors early.
By following these steps, you can successfully add TXT records to your DNS, enabling critical services and enhancing your domain's security.
