TXT (Text) records are DNS records that store text-based information about a domain, often used for email verification, SPF, DKIM, and other security purposes. This guide will walk you through the steps to add and remove TXT records using cPanel.

What You’ll Learn:

  1. How to add a TXT record in cPanel.
  2. How to remove an existing TXT record.

1. Log in to cPanel

Before you can manage DNS records, log in to your cPanel account:

  • Open your cPanel login URL (usually yourdomain.com/cpanel).
  • Enter your username and password to access the dashboard.

2. Access the Zone Editor

The Zone Editor allows you to manage DNS records, including TXT records.

  1. In the Domains section of your cPanel dashboard, click on Zone Editor.
  2. You’ll now see a list of your domains, allowing you to add, modify, or delete DNS records for each one.

3. Adding a TXT Record

To add a new TXT record for your domain:

  1. In the Zone Editor, find the domain where you want to add the TXT record and click Manage.
  2. At the top right, click + Add Record and select TXT Record.
  3. Fill in the following details:
    • Name: Enter the subdomain or root domain for the record. Use @ if you’re applying the record to the root domain (e.g., yourdomain.com).
    • TTL (Time to Live): You can set this value to determine how long the record is cached. The default is usually 14400 (4 hours).
    • Record: This is the actual text of the TXT record. It could be an SPF policy, DKIM key, or other text strings.

Example for SPF Record:
less
Copy code
v=spf1 a mx include:_spf.google.com ~all

  1. Click Save Record to add the TXT record.

Your new TXT record will now be listed in the DNS records for your domain. Keep in mind that DNS propagation can take up to 24-48 hours, depending on the server and the TTL setting.

4. Removing a TXT Record

To remove an existing TXT record from your domain:

  1. In the Zone Editor, find the domain where the TXT record is located and click Manage.
  2. In the list of DNS records, locate the TXT record you want to remove.
  3. Click the Delete button (usually represented by a trash can icon) next to the record.
  4. Confirm the deletion when prompted.

The TXT record will be removed from your domain’s DNS settings. Like with any DNS change, it may take up to 48 hours for the removal to fully propagate across the internet.

5. Common Uses for TXT Records

Here are some common uses for TXT records:

  • SPF (Sender Policy Framework): Used to prevent email spoofing by specifying which mail servers are allowed to send emails on behalf of your domain.

Example:
makefile
Copy code
v=spf1 include:_spf.google.com ~all

  • DKIM (DomainKeys Identified Mail): Adds a digital signature to email headers for security.

Example:
css
Copy code
v=DKIM1; k=rsa; p=MIGfMA0GCSqG...

  • DMARC (Domain-based Message Authentication, Reporting, and Conformance): Helps prevent email spoofing by aligning SPF and DKIM records.

Example:
css
Copy code
v=DMARC1; p=none; rua=mailto:[email protected]

  • Domain Verification: Many services like Google Workspace or Microsoft 365 require a TXT record to verify domain ownership.

6. Verify DNS Changes

After making changes to your TXT records, it’s important to verify that they’ve been updated and propagated correctly. You can use DNS lookup tools like:

  • MXToolbox
  • WhatsMyDNS

These tools will show you the current status of your TXT records and help confirm if the changes have propagated.

7. Best Practices for Managing TXT Records

  • Double-check the TXT values: TXT records are sensitive to syntax, so make sure the record values (especially for SPF and DKIM) are entered correctly.
  • Use appropriate TTL: For testing purposes, you can set a low TTL (e.g., 300 seconds) to speed up propagation. Once you’ve confirmed the change, raise the TTL back to a standard value like 14400 seconds.
  • Monitor DNS propagation: After making changes, use DNS lookup tools to confirm that the new records have propagated across the internet.

Conclusion

Managing TXT records in cPanel is a simple process using the Zone Editor. Whether you’re adding a new SPF, DKIM, or verification record, or removing an outdated one, cPanel makes it easy to modify your domain’s DNS settings. Remember to monitor the DNS propagation after making changes to ensure that the new or removed records are correctly applied.

Hjalp dette svar dig? 0 Kunder som kunne bruge dette svar (0 Stem)