How to Manage DNS Records in cPanel

DNS Records in cPanel

Managing DNS records in cPanel is an essential task for configuring how your domain name points to various services like websites, email servers, or other resources. Here’s a step-by-step guide:

DNS Records in cPanel

1. Access the DNS Zone Editor

  1. Log into cPanel: Go to your cPanel URL (usually something like https://yourdomain.com/cpanel) and log in with your credentials.
  2. Locate the DNS Zone Editor:
    • Navigate to the Domains section.
    • Click on Zone Editor.

2. Understanding DNS Record TypesFhosting

Before making changes, it’s essential to understand the types of DNS records you might manage:

  • A Record: Points your domain or subdomain to an IP address.
  • CNAME Record: Alias for another domain or subdomain.
  • MX Record: Directs email traffic to your email server.
  • TXT Record: Holds text information, often used for verification (e.g., SPF, DKIM, or domain ownership).
  • SRV Record: Defines a service location (e.g., VoIP or chat services).
  • AAAA Record: Maps a domain to an IPv6 address.
  • NS Record: Specifies the authoritative name servers for your domain.

3. Adding a DNS Record

  1. In the Zone Editor, locate your domain from the list.
  2. Click on + Add Record.
  3. Choose the type of record (A, CNAME, MX, etc.).
  4. Enter the following details:
    • Name: The domain or subdomain (e.g., www, mail, or leave blank for root).
    • TTL (Time to Live): Default is often fine (e.g., 14400 seconds).
    • Value: The IP address, hostname, or other value depending on the record type.
  5. Click Save Record.

4. Editing a DNS Record

  1. In the Zone Editor, find the record you want to edit.
  2. Click the Edit button next to it.
  3. Modify the details as needed:
  4. Click Save Record to apply changes.

5. Deleting a DNS Record

  1. Locate the record in the Zone Editor.
  2. Click the Delete button next to it.
  3. Confirm the deletion.

6. Common DNS Configurations

Here are a few examples of common configurations:

Point a Domain to a Web Server (A Record)

  • Name: Leave blank (for the root domain) or enter a subdomain (e.g., www).
  • Type: A
  • Value: Enter your server’s IP address.

Set Up Email Hosting (MX Record)

  • Name: Leave blank or enter a subdomain (e.g., mail).
  • Type: MX
  • Priority: Typically 10 or as specified by your email host.
  • Value: The mail server address provided by your email host (e.g., mail.example.com).

Create a Subdomain Redirect (CNAME Record)

  • Name: The subdomain (e.g., blog).
  • Type: CNAME
  • Value: The target domain or subdomain (e.g., example.wordpress.com).

Verify Domain Ownership (TXT Record)

  • Name: Leave blank for root or use the specified name from the verification instructions.
  • Type: TXT
  • Value: The verification code provided by your service (e.g., Google, Microsoft).

7. Propagation Time

  • DNS changes may take some time to propagate globally. This can range from a few minutes to 48 hours depending on the TTL value and ISPs.

8. Additional Tips

  • Backup DNS Records: Before making significant changes, document the existing DNS records for recovery if needed.
  • Check for Conflicts: Ensure there are no duplicate records of the same type that might cause issues.
  • Verify Changes: Use online tools like MXToolbox or WhatsMyDNS to verify that your DNS records are correct.

By following these steps, you can effectively manage your DNS records in cPanel to ensure your domain functions correctly for your website, email, and other services.