Skip to content

A new Netlify site starts on an address that ends in netlify.app. It is perfect for testing and for sharing a draft, but it is not a name you would put on a business card, and it ties your brand to a hosting company. Connecting your own domain gives the site an address that belongs to you, keeps it portable if you ever change host, and lets email, social profiles and search results all point to the same name.

This guide covers the full path: what connecting a domain really involves, how to choose between letting Netlify manage the DNS and keeping your current provider, which records are needed for www and for the bare (apex) domain, how HTTPS is handled, and how to tidy up redirects afterwards. The same ideas exist in the guide for Vercel, and comparing the two shows which parts are universal. Once the site is live, the choices you make about names also matter for search, which is covered in SEO for a new website: domain or content first and what a new domain needs before SEO.

What connecting a domain involves

Three separate pieces have to agree, and most trouble comes from confusing them.

Registration is where you hold the name. It lives in an account at a registrar, and it renews on a schedule. DNS is the set of records that tells the world where the name should go. Hosting is the Netlify side: the site must be told to answer for the name, and it must obtain a certificate for it.

If the registrar points at nameservers that do not contain your records, nothing resolves. If the records point at Netlify but the site does not list the name, visitors reach Netlify and see a not-found page. If the site lists the name but the records point elsewhere, the certificate never appears. When something fails, ask which of the three is out of step, instead of changing settings at random.

If you do not own a name yet, the domains page shows what can be registered.

Choose your DNS route

Netlify offers two ways to connect a domain, and the choice shapes everything that follows.

Netlify DNS External DNS (your current provider)
What you change Nameservers at the registrar A few records at your DNS host
Who holds the zone Netlify Your existing provider
Apex domain Handled for you A record, or ALIAS, ANAME or flattened CNAME
Email records You must recreate them in Netlify before switching Stay where they are
Best when New domain with no email or other services Domain already has email or other services

Netlify DNS is the simpler route for a brand-new domain, because the platform creates and maintains the records that point at the site. The cost of that simplicity is that moving nameservers moves everything, so any email, verification and third-party records must be recreated first. External DNS is the lower-risk route for a domain that is already in use, because you add only what the site needs.

Before you start

  • Confirm that the site is published and loads on its netlify.app address. A domain cannot repair a broken deploy.
  • Decide the main address. Many sites use www.example.com as the main name and redirect the bare name, while others choose the bare name. Pick one.
  • Find where the domain's DNS is managed. At the registrar, look at the nameserver list.
  • Write down or export every existing DNS record, especially MX and TXT records for email. This copy is your safety net.
  • If your provider allows it, lower the TTL on records you will change, so mistakes correct themselves faster.

Add the domain in Netlify

Labels in the dashboard may change over time, so follow the idea rather than the exact words.

  1. Open your site in the Netlify dashboard and go to the domain management section.
  2. Choose to add a domain you already own and type the name exactly as visitors will type it. Add both the www and bare versions if you want both to work.
  3. Netlify checks whether the name is registered and offers its DNS options. Choose Netlify DNS or external DNS according to the table above.
  4. If you chose Netlify DNS, Netlify shows a list of nameservers. Copy them to the nameserver settings at the registrar, replacing the existing ones. Before you do, recreate your email and other records in the Netlify zone.
  5. If you chose external DNS, Netlify shows the records you need. Add them at your DNS host.
  6. Return to the domain settings and use the verification option. When the DNS is detected correctly, Netlify offers to provision the certificate.

Do not add the same name to two sites, and remove it from the old site when you move one. A name belongs to one place at a time.

The records for external DNS

Goal Name Type Value
Serve www www CNAME your-site-name.netlify.app
Serve the apex @ (example.com) A The load balancer address shown in the Netlify dashboard
Serve the apex (alternative) @ ALIAS, ANAME or flattened CNAME The apex load balancer name shown by Netlify, if your provider supports it
Keep email working @ MX, TXT Unchanged

Copy the current values from Netlify, because addresses can change over time and old tutorials go stale. A few rules keep the zone clean:

  • A name with a CNAME must not hold any other record type. That is why an ordinary CNAME cannot sit at the apex, which must have SOA and NS records.
  • Enter only the host part. Many dashboards append the domain, so typing the full name creates a doubled name.
  • Do not leave older records for the same name pointing at a previous host. Visitors would be split between old and new.
  • Leave MX, SPF, DKIM and DMARC alone. They are unrelated to the website.

HTTPS, the primary domain and redirects

Once DNS is verified, Netlify can obtain a certificate through an automated process, using Let's Encrypt as described in its documentation. The step normally completes within minutes to an hour and renews automatically while the DNS stays pointed at Netlify. Test in a private window with https at the front. A padlock without a warning means it worked.

Then tidy up:

  1. Set the primary domain. Netlify redirects your other names, including the netlify.app address, to it. This keeps one version of the site visible, which is good for visitors and search engines alike.
  2. Test every form: http and https, with and without www. All four should end at the same final address.
  3. Fix mixed content. A single image or script loaded over plain HTTP removes the padlock even when the certificate is valid. Use relative paths or HTTPS in your pages.
  4. Update the sitemap, canonical tags, social profile links and contact pages to the final address.
  5. Add the site to the search engine's webmaster tools using the final address, and submit the sitemap, as described in the SEO Starter Guide.

Certificates that you manage yourself, such as for a server or an API, are a separate topic.

A worked example

Imagine a local bakery called Corner Oven with the domain corneroven.example, registered at one company, with email hosted separately. The new site is on Netlify at corner-oven.netlify.app.

  1. The owner decides the main address will be www.corneroven.example, with the bare name redirecting to it.
  2. They export every DNS record. There are two MX records and four TXT records for email.
  3. Because email is already running, they choose external DNS and leave the nameservers alone.
  4. In Netlify they add the domain. Netlify says to create a CNAME from www to corner-oven.netlify.app and an A record for the bare name.
  5. At the DNS host they add the two records, copying values from Netlify, and leave the email records untouched.
  6. They verify DNS in Netlify, wait a few minutes, and provision the certificate.
  7. In a private window, https://www.corneroven.example loads with a padlock, and http://corneroven.example ends at the www address.
  8. They set the www name as the primary domain, update the sitemap and social links, and add the site to the search engine's webmaster tools.

Nameservers were never touched, so the bakery's email never stopped.

Limits and what to watch for

  • Moving nameservers moves the entire zone. Recreate every record, especially email, before you switch.
  • A CNAME at the apex is not valid in standard DNS. Use A, or ALIAS, ANAME or flattening if your provider offers it.
  • Do not mix records that point to different hosts for the same name.
  • Certificates cover the names configured on the site. A new subdomain has to be added in Netlify, not only in DNS.
  • A CAA record that does not allow the issuing authority blocks the certificate. If you use CAA, list every authority that must be allowed.
  • A CDN or proxy placed in front of the site can interfere with verification and issuance. Follow Netlify's guidance for that case, or pause the proxy while the certificate is issued.
  • Features, build minutes and bandwidth depend on your Netlify account and plan, so check the current Netlify documentation and plan details rather than assuming.
  • Keep the registrar account secure with two-factor authentication. Whoever controls the registrar or DNS controls where your site points.
  • Domain renewals matter. An expired domain stops the site and email together. Put the date in a calendar.
  • Remove DNS records that point at Netlify when you retire a site, so nobody else can claim the name there.

Troubleshooting

Symptom Likely cause What to do
Netlify not-found page on your domain The site does not list this exact name Add the name in domain management
DNS verification fails Missing record, doubled name or old record Compare the live answer with Netlify's instructions
Certificate will not provision DNS not yet detected, or a CAA record blocks it Wait, fix records, then try again
Works for you, not for others DNS still spreading or cached answers Test from another network and wait for the TTL
Bare domain fails but www works No apex record or wrong value Add the A, ALIAS or ANAME record from Netlify
Email stopped after changing nameservers Records not recreated Restore MX, SPF, DKIM and DMARC from your saved copy

When you read an answer from a lookup tool, compare it character by character with the value in the instructions. Typing slips, missing dots and doubled domains cause a large share of failures.

Summary

Connecting a domain to Netlify means getting the registrar, the DNS records and the site settings to agree. Choose Netlify DNS for a brand-new name or external DNS for a domain that already runs email, add the www CNAME and the apex record from the dashboard, then verify and provision the HTTPS certificate. Set one primary domain, test all four forms of the address, fix mixed content and update your sitemap. Keep a copy of your old records, protect the registrar account and renew on time. When you are ready to choose a name or set up mail on it, the business email page is a good place to continue.

Frequently asked questions

Should I use Netlify DNS or keep my current DNS provider?

Both work. Netlify DNS means changing your nameservers so Netlify manages the whole zone, which makes the apex simple. Keeping your current provider means adding a few records there yourself and leaving everything else, including email, where it is.

Which records does Netlify need for www and the apex domain?

For www, a CNAME pointing at your site's netlify.app address. For the apex, either an A record to the load balancer address shown in the Netlify dashboard, or an ALIAS, ANAME or flattened CNAME if your provider supports one. Always copy the current values from Netlify.

Is the HTTPS certificate automatic?

Yes. Once the DNS is verified, Netlify can provision a certificate for the domain and renew it automatically. If provisioning fails, the cause is usually a wrong or missing record or a CAA record that blocks the authority.

What is the primary domain setting?

It tells Netlify which of your domain names is the main one. Other names, including the default netlify.app address, are redirected to it, which keeps one version of the site visible to visitors and search engines.

Does connecting a domain affect my email?

Not if you leave the MX, SPF, DKIM and DMARC records unchanged. The risk is in switching nameservers without recreating every existing record first.

About the author

Bob Kanokphon Thongdee, founder of XPASS VPN

Bob Kanokphon Thongdee

  • Founder of XPASS VPN
  • Co-founder of eSIMonline.asia
  • More than 7 years in online marketing
  • Founder of Cojourney Visa and Cojourney Travel

Start your website the right way

Register a domain, add SSL and set up business email from one place.

.com registration from $18.81 for the first year

Start with a domain

Keep reading

Website Guides

How to Connect Your Own Domain to Vercel

A calm, step-by-step walk through adding a custom domain to a Vercel project, choosing DNS records, and confirming that the certificate and redirects work.

10 min read

Website Guides

SEO for a New Website: Start With the Domain or the Content?

A new website needs both a domain and content, but the order matters. Learn what each one contributes to search and how to sequence the work.

9 min read

Website Guides

What a New Domain Needs Before You Start SEO

A new domain needs more than a good name before SEO begins. Walk through the history check, technical setup and site foundations to prepare.

9 min read