How to Connect a Domain to Netlify Using cPanel DNS

You don’t need to transfer your domain or change nameservers to use Netlify. If your DNS lives inside cPanel, you can point it to Netlify in minutes — without touching your email accounts or existing hosting.

This guide covers both subdomains (e.g., app.yourdomain.com) and root/apex domains (e.g., yourdomain.com) using cPanel’s Zone Editor.

Prerequisites

  • A cPanel hosting account with DNS management access
  • A Netlify account with a deployed project
  • Your Netlify site’s default URL (e.g., your-app-name.netlify.app)

Step 1: Add Your Custom Domain in Netlify

Before editing DNS records, tell Netlify to accept traffic from your domain.

  1. Open Project Settings: Log into Netlify, select your project, and go to Site configuration > Domain management.
  2. Add Custom Domain: Click Add custom domain and enter your full domain or subdomain (e.g., app.yourdomain.com or yourdomain.com).
  3. Copy your Netlify URL: Note your site’s default address under the site title (e.g., your-app-name.netlify.app). You’ll need this in the next step.

Step 2: Update DNS Records in cPanel

Log into cPanel and open the Zone Editor under the Domains section.

Option A: Connecting a Subdomain (Recommended)

Example: app.yourdomain.com or blog.yourdomain.com

  1. Check for Conflicts: Search for your subdomain prefix in the Zone Editor. If an A record already exists for that subdomain, delete it to avoid CNAME conflict errors.
  2. Add CNAME Record: Click + Add Record and fill out the fields:
    • Name: app.yourdomain.com (or just your subdomain prefix)
    • Type: CNAME
    • Record / Target: your-app-name.netlify.app (your default Netlify address)

Option B: Connecting a Root / Apex Domain

Example: yourdomain.com and www.yourdomain.com

DNS standards prevent adding a CNAME to a bare root domain. Instead, use an A record for the root and a CNAME for www.

Record TypeName / HostValue / TargetPurpose
Ayourdomain.com75.2.60.5Points root domain to Netlify Load Balancer
CNAMEwwwyour-app-name.netlify.appRoutes www subdomain to Netlify CDN

Important: Remove any pre-existing A records pointing yourdomain.com to your old cPanel server IP before adding the Netlify A record.


Step 3: Verify and Wait for SSL

  1. DNS Propagation: DNS updates typically take 5–15 minutes to take effect globally, though rare cases can take up to 24–48 hours.
  2. Free SSL Certificate: Netlify automatically provisions a free Let’s Encrypt SSL certificate once it detects that your DNS records are correctly pointing to its servers.
  3. Verify Connection: Go back to Netlify > Domain management and click Verify DNS configuration if the badge shows “Pending”.

Troubleshooting

“CNAME and other data” Error in cPanel

cPanel prohibits a CNAME record from sharing a host name with an A, MX, or TXT record. Search your Zone Editor for existing entries under that exact subdomain name and delete the conflicting record first.

Seeing cPanel Default Page Instead of Netlify

Your local machine has cached the old cPanel IP address. Flush your local DNS cache or open the page in an Incognito window to verify.


Tags: #cPanel #Netlify #DNS #DomainManagement #WebHosting #SSL #WebDevelopment