How to set up custom domain on Netlify

beginner 8 min read Updated 2026-03-13
Quick Answer

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

1

Log into Netlify and select your site

Navigate to your Netlify account dashboard and select the site you want to link to a custom domain. This is the site where your application or website is currently deployed.
2

Access domain management settings

In the site UI, click on the left sidebar and select Domain management. This section contains all domain configuration options for your Netlify site.
Some Netlify interfaces may show 'Set up a custom domain' as a button in the main dashboard—either approach leads to the same configuration page.
3

Add your custom domain

Click 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.
Ensure you own or have registered the domain before attempting to add it to Netlify.
4

Choose your DNS configuration method

Netlify offers two DNS management approaches: Netlify DNS (where Netlify manages all DNS records) or external DNS (where your domain registrar manages DNS records). You must choose one method and never configure both simultaneously, as this creates conflicting configurations that prevent your domain from resolving correctly. For simplicity, Netlify DNS is recommended as it handles all configuration within Netlify's interface.
If you've already configured external DNS records at your registrar, stick with that approach rather than switching to Netlify DNS.
5

Configure external DNS records (if using external DNS)

If you chose external DNS, return to your Netlify domain dashboard and select 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).
Copy the exact values from Netlify's domain dashboard to avoid typos. Do not use generic IP addresses like 104.198.14.52 unless Netlify specifically instructs you to do so.
6

Configure the www subdomain

Netlify automatically creates a 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.
Some DNS providers allow you to add multiple records at once. Batch your DNS changes together to speed up propagation.
7

Verify DNS propagation in Netlify

Return to your Netlify domain dashboard and refresh the page. Once you've added the DNS records at your registrar, Netlify will detect the changes and verify that both your apex domain and www subdomain are properly connected. The status should change from 'Pending DNS verification' to a green checkmark indicating successful configuration.
DNS propagation can take up to 24 hours to complete across the internet, though it typically resolves within 5-30 minutes. If verification doesn't appear immediately, wait a few minutes and refresh the page.
8

Set your primary domain (if needed)

If you have multiple domains configured for your site, you can designate one as the primary domain. In your Netlify domain management dashboard, locate your custom domain and set it as the primary domain if it isn't already. This ensures that your site's canonical URL points to your custom domain.
Netlify automatically provisions an SSL/TLS certificate (Let's Encrypt) for your custom domain, so your site will be accessible via HTTPS without additional configuration.
9

Test your custom domain

Once DNS verification is complete and the status shows green in Netlify, open your browser and navigate to your custom domain (for example, https://yourdomain.com). Your Netlify site should load correctly. Test both the apex domain and the www subdomain to ensure both resolve properly.
If your site doesn't load immediately, clear your browser cache and try again. DNS changes can take time to propagate to your local network.

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.