How to add a TXT record to DNS?

Knowledge Base > Migration > How to add a TXT record to DNS?

Adding a TXT (Text) record to the Domain Name System (DNS) is a common practice for various purposes, including domain ownership verification, email authentication, and service configuration. TXT records store text-based information associated with a domain. Whether you’re setting up SPF (Sender Policy Framework) for email authentication or verifying domain ownership for services like Google Workspace, adding a TXT record involves a straightforward process. Here’s a step-by-step guide to help you navigate this DNS task:

1. Log in to Your DNS Hosting Provider:

  • Navigate to your DNS hosting provider’s website and log in to your account. Access the DNS management dashboard where you can modify your domain’s DNS records. Common DNS hosting providers include GoDaddy, Namecheap, and Cloudflare.

2. Locate the DNS Management Section:

  • Find the DNS management section or the area where you can add or edit DNS records. This is usually labeled as “DNS Management,” “DNS Settings,” or a similar term, depending on your hosting provider.

3. Select Your Domain:

  • Identify the domain for which you want to add a TXT record. If you manage multiple domains, ensure you are working with the correct one.

4. Choose to Add a New Record:

  • Look for an option to add a new record. This is often labeled as “Add Record,” “Add DNS Record,” or something similar. Select the record type; in this case, choose “TXT” from the available options.

5. Enter the TXT Record Information:

  • You will typically see fields to input the details of your new TXT record. Here’s the information you may need to provide:
    • Name/Host/Hostname: This could be the subdomain for which you are adding the TXT record, like “_spf” if setting up SPF for email.
    • Value/Text/Data: This is where you input the specific text information associated with the TXT record. For SPF, it might be the authentication information, and for domain verification, it could be a code provided by the service you’re verifying with.

6. Set TTL (Time to Live):

  • TTL determines how long the DNS information is cached. You can usually leave this at the default setting or adjust it based on your preferences.

7. Save the Changes:

  • Once you’ve entered the required information, save the changes. This action updates the DNS records for your domain. Note that DNS changes may take some time to propagate across the internet.

8. Verify the TXT Record:

  • After making the changes, it’s advisable to verify that the TXT record has been added correctly. You can use online tools like DNS lookup or command-line tools like nslookup to check the TXT record’s presence and content.

Important Considerations:

  • Syntax Matters: Ensure that you enter the TXT record information with the correct syntax. Any errors may lead to issues with the intended functionality of the record.
  • Propagation Time: Keep in mind that DNS changes take time to propagate globally. While some changes may be nearly instant, others could take up to 48 hours to reflect universally.

Adding a TXT record to DNS is a straightforward process that varies slightly based on your DNS hosting provider. Following these steps ensures that you correctly configure the TXT record to serve its intended purpose, whether it’s for email authentication, domain verification, or another use case.

Common Questions

  • Why would I need to add a TXT record to DNS?

    Adding a TXT record to DNS is commonly required for tasks like email authentication (SPF records), domain ownership verification (TXT records for services like Google Workspace), or configuring other services that rely on text-based information associated with your domain.

  • How do I add a TXT record to DNS for email authentication?

    To add a TXT record for email authentication, log in to your DNS hosting provider, navigate to DNS management, select your domain, and add a new TXT record. Enter the subdomain (e.g., “_spf”) and the specific authentication information provided by your email service provider, then save the changes.

  • Can I add multiple TXT records for the same domain?

    Yes, you can add multiple TXT records for the same domain. Each TXT record serves a specific purpose, such as SPF for email, DKIM, or domain ownership verification. Ensure that the information in each TXT record is accurate and relevant to its intended use.

  • How long does it take for a new TXT record to take effect?

    DNS changes, including adding a new TXT record, may take some time to propagate across the internet. While some changes can be nearly instant, it’s advisable to allow up to 48 hours for global propagation. You can use DNS lookup tools to check the status of your TXT record.

  • What is the syntax for entering information in a TXT record?

    The syntax for a TXT record includes specifying the subdomain (e.g., “_spf”) and entering the relevant text information. Ensure accurate formatting and follow the guidelines provided by your service provider. Syntax errors may impact the functionality of the TXT record.

  • Can I edit or remove a TXT record after adding it to DNS?

    Yes, you can edit or remove a TXT record after adding it to DNS. Access your DNS management dashboard, locate the TXT record, and make the necessary changes. Keep in mind that DNS changes may take time to propagate, and changes to existing records should be approached with caution to avoid service disruptions.