How to set up custom domain on Netlify
Log into your Netlify account, select your site, and click 'Add domain' to add your custom domain name. Then choose either Netlify DNS or external DNS configuration—never configure both. If using external DNS, create a CNAME record pointing to your Netlify project URL at your registrar. DNS propagation typically takes 5-30 minutes.
Prerequisites
- A Netlify account with a deployed site
- A custom domain that you own or have registered
- Access to your domain registrar's DNS management dashboard
- The ability to modify DNS records at your registrar
Step-by-Step Instructions
Log into Netlify and select your site
Access domain management settings
Domain management. This section contains all domain configuration options for your Netlify site.Add your custom domain
Add domain, then select Add a domain you already own. Enter your custom domain name (for example, demo-sst.dev) in the text field and click Verify. Confirm by clicking Add domain. Your custom domain will now be set as the primary domain for your production site by default.Choose your DNS configuration method
Configure external DNS records (if using external DNS)
Pending DNS verification next to your custom domain to view customized DNS setup details. Netlify will provide specific DNS records you need to add. Go to your domain registrar's DNS management portal (such as Name.com, Namecheap, or Hostinger) and add the required records. For most external DNS providers, you'll need to create a CNAME record that points to project-name.netlify.app, where project-name is your Netlify project name (for example, if your Netlify project URL is https://my-project.netlify.app, then your CNAME value should be my-project.netlify.app).Configure the www subdomain
www subdomain for your domain. To complete the setup, add a CNAME record for the www subdomain at your DNS provider. Set the Name to www, the Type to CNAME - Canonical name, and the Value to your Netlify site URL (for example, serverless-stack-2-client.netlify.com). This ensures that both yourdomain.com and www.yourdomain.com resolve correctly.Verify DNS propagation in Netlify
Set your primary domain (if needed)
Test your custom domain
https://yourdomain.com). Your Netlify site should load correctly. Test both the apex domain and the www subdomain to ensure both resolve properly.Common Issues & Troubleshooting
Configuring both Netlify DNS and external DNS simultaneously
This is the most critical mistake. You must choose one DNS management approach or the other. If you've already set up external DNS records, do not also set up Netlify DNS, as this creates conflicting configurations that prevent your domain from resolving correctly. Decide which DNS management method you prefer—for simplicity, Netlify DNS is recommended. If you've already configured external DNS, stick with that approach.
Domain shows 'Pending DNS verification' for more than 24 hours
Verify that you've added the correct DNS records at your registrar. Double-check the CNAME record values against what Netlify displays in your domain dashboard. Ensure you're adding records to the correct domain in your registrar's DNS management portal. If records are correct, contact your domain registrar's support to confirm DNS propagation status. In rare cases, DNS propagation can take up to 48 hours.
Incorrect CNAME record values preventing domain resolution
When using external DNS, you must point your domain to your specific Netlify project URL, not a generic IP address. Verify your exact Netlify project URL in your site settings (it will look like <code>https://my-project.netlify.app</code>). Create a CNAME record with this exact value. Do not use generic IP addresses like 104.198.14.52 unless Netlify specifically instructs you to do so in your domain dashboard.
www subdomain not resolving or showing as 'not propagated'
Ensure you've added a separate CNAME record for the www subdomain at your DNS provider. Set the Name to <code>www</code>, Type to <code>CNAME</code>, and Value to your Netlify site URL. After adding the record, return to Netlify and refresh your domain dashboard. DNS propagation for the www subdomain may take a few minutes to complete.
SSL/TLS certificate not provisioning for custom domain
Netlify automatically provisions an SSL/TLS certificate once your domain is verified and DNS is properly configured. If your domain shows as verified but the certificate hasn't provisioned after 30 minutes, try refreshing your domain settings page. In rare cases, you may need to remove and re-add the domain. Ensure your domain is set as the primary domain, as Netlify prioritizes certificate provisioning for primary domains.