Mini lesson · English

How to connect a custom domain to your website

Connect a domain you control to a supplied or existing practice site, preserving unrelated settings and checking HTTPS.

Start the interactive lessonRead the lesson below

Who is this for?

People who want their website at their own domain. You will use hosting and domain-provider screens; no DNS scripting or website coding is required.

Before you start

A working hosted practice site, a domain or subdomain you control and permission to change its DNS. Registration may cost money. Use the supplied starter if you need a practice page; keep existing mail settings safe. Worked answers are illustrative examples, not completed tests on your account. Replace their sample observations with your own results, or identify the step that is still blocked.

Estimated time: 16–28 min

Estimates for the supplied starter files with prerequisite accounts and tools ready. Setup, deployment queues and delivery/DNS waits take additional time. DNS caching and certificate issuance add waiting time. Do not treat a pending certificate as a completed HTTPS test.

What you will learn

  • Get the required website records from the actual hosting project.
  • Apply only the intended DNS changes.
  • Check the final address, HTTPS and existing mail.

Workshop files

Step 1

Choose the site and address

Start from a hosted page that already works.

Open your practice site at its host-provided address. Choose the owned domain or subdomain you want to connect. The registrar is where the domain is registered; the authoritative DNS provider is the service currently controlling its address records. They can be different companies.

Ask the assistant to identify the actual registrar, DNS provider and hosting project before any edit. Confirm your access and exact practice hostname; buying a domain alone does not connect the website.

A concrete example

Think of the registrar as where the domain is registered, DNS as the address book and hosting as where the page lives. If you bought the domain at A but delegated its nameservers to B, B controls its DNS records. Ask the assistant to identify those actual providers before any edit.

Help connect my owned practice domain to the intended hosting project. Read the host’s actual domain instructions and prepare a before/after DNS plan. Preserve unrelated mail and verification records. Explain each change before I apply it; do not buy a domain or alter another project. Help me check HTTPS, the chosen redirect and existing email afterward.

Files for this step

Start hereWorkshop files

Open or download the files below. When saving a project, keep the folder paths shown in the filenames.

How it works (optional)

Connect your domain to a working website

Owning a domain does not automatically connect it to the files at your web host.

A registrar manages your domain registration. DNS tells clients where a name should lead. A web host serves the site. These may be provided by different companies.

Keep the host’s existing public URL working while you connect the domain. For this workshop, use the host’s custom-domain flow and keep DNS at its current provider. That avoids an unnecessary nameserver migration.

Worked example

Alex already has a working host-provided site URL. Adding alex.example as a custom domain creates a second route to that site only after the required DNS and host settings agree. The example name is reserved; you must use your own domain.

Extra implementation exercise

You bought a domain, but entering it shows a parking page. Which two services still need to be connected?

Show a worked solution

Check the host’s custom-domain setup and the domain’s authoritative DNS records. Registration alone does not tell the browser which site to request.

  • Distinguishes registration from DNS configuration.
  • Connects the DNS name to the intended hosting project.

Step 2

Save the existing settings

Keep a record you can use to undo only your change.

Open the domain’s current DNS screen and save a private screenshot or redacted record. Mark existing mail and verification entries to preserve. Use dns-plan.csv to plan the website edit.

Do not delete unrelated entries just because a tutorial screenshot has fewer rows. Have the assistant explain the specific row it proposes to change.

A concrete example

A domain can use one company for its website and another for mail. A website connection that needs a www row is not permission to remove the existing mailbox’s MX or verification rows.

Files for this step

Start hereWorkshop files

Open or download the files below. When saving a project, keep the folder paths shown in the filenames.

How it works (optional)

Record the current DNS before editing it

A domain may already support email or other services that must keep working.

Find the provider that currently hosts the authoritative DNS zone. Your registrar’s account may not be the place where the effective records are managed. Save a record export or clear screenshots and copy the relevant current values into checks.txt.

Identify records for the website, email and service verification. MX records route incoming email; TXT records may verify ownership or email authentication. Changing a website record does not require deleting these unrelated records.

To identify who hosts the zone, inspect the nameserver delegation in the registrar account or run nslookup -type=NS YOUR_DOMAIN. Compare those NS hostnames with your DNS provider’s documentation/account. If they point elsewhere or use custom branding you cannot identify, ask the domain owner before editing a zone that may not be authoritative.

Worked example

If a domain has existing MX records, replacing the whole zone with a website-only example can stop mail delivery. The supplied dns-plan.csv separates a planned website change from records to preserve.

# Replace YOUR_DOMAIN with your own domain name; this is a read-only lookup.
nslookup -type=NS YOUR_DOMAIN

Extra implementation exercise

A tutorial shows only one website record. Your zone also has MX and TXT records. Should you delete the extras to match the screenshot?

Show a worked solution

No. Record what those entries do and keep them unless the relevant service explicitly requires a change. A screenshot is not a complete plan for your domain.

  • Preserves records used by existing services.
  • Uses the current host’s requirements rather than copying a different domain’s zone.

Step 3

Apply the host’s actual values

Use values issued for your project, not invented example records.

Add the hostname to the intended hosting project. Copy the required record type, name and value from that project into your plan, then apply it at the DNS provider. Ask the assistant to check formatting before saving.

A hostname value is different from a full web address. Keep schemes and paths out of a field that requests only a DNS hostname; follow the actual field’s instructions.

A concrete example

The web address https://site.example/path contains a scheme, hostname and path. A field asking for a CNAME target expects a DNS hostname, not that whole web address. Read the record type and field label before saving.

Netlify: domains

Files for this step

Start hereWorkshop files

Open or download the files below. When saving a project, keep the folder paths shown in the filenames.

How it works (optional)

Apply the host’s exact domain instructions

Use the type, name and value supplied for your own hosting project.

Add the intended domain in your hosting project’s domain settings. The host will provide the required records or verification steps. Copy those values into your plan before changing DNS.

An apex name and a www subdomain can require different record types. A standard CNAME at the zone apex conflicts with required zone records. Some DNS providers offer an alias or CNAME-flattening mechanism there; others use host-supplied A records. Follow the current provider-specific instructions instead of inventing an apex CNAME or copying an old IP address.

The provider may call its apex alias feature ALIAS, ANAME or CNAME flattening. Those names are interface-specific. Do not choose a record by its familiar label: compare the record type, host/name and target with your own hosting project's instructions.

If the DNS interface offers no apex alias/flattening feature, consult its official apex-CNAME/ALIAS/ANAME guide or support page and use only the alternative A/AAAA instructions supplied by your web host. The www subdomain worked route avoids inventing an unsupported apex record.

Worked example

If the host asks for a CNAME for www, its target is a hostname. If it asks for an A record, its value is an IP address. Neither value should be inferred from the label on someone else’s site.

Netlify: domains

Extra implementation exercise

Your instructions request a CNAME hostname, but you pasted a full https:// URL as its value. What should change?

Show a worked solution

Use the target hostname provided by the host, without https:// or a page path. Save the record in the provider’s required format and recheck it.

  • Uses the DNS target hostname rather than a URL with a scheme/path.
  • Checks the exact record format expected by the DNS provider.

Step 4

Check HTTPS and alternate addresses

DNS recognition and a working secure page are separate checks.

Use the host’s domain diagnostics, then open the intended address in a fresh browser window. Check its secure connection and the chosen behavior for the alternate hostname, if one is configured.

If the certificate is pending or the browser warns, keep the result marked incomplete. Avoid repeatedly deleting and recreating records while waiting.

A concrete example

Three checks can disagree temporarily: the record is saved, the host recognizes it, but HTTPS is not ready. Record each state so the next action addresses the pending stage.

Files for this step

Start hereWorkshop files

Open or download the files below. When saving a project, keep the folder paths shown in the filenames.

How it works (optional)

Verify DNS, HTTPS and the preferred address

The goal is a working visitor URL, not merely a saved DNS form.

Use the host’s domain diagnostics and open the exact address in a private browser window. Check the final hostname and HTTPS certificate. DNS records may remain cached for a while; save the change time and inspect the actual observed result.

Choose the preferred hostname in the hosting configuration and verify the other version redirects to it if you configured both. Recheck existing email. A pending certificate, incorrect host or broken mailbox means the work is not finished.

If diagnostics disagree, compare a read-only lookup such as nslookup -type=CNAME www.YOUR_DOMAIN with your saved plan and the host’s result. Record the previous record’s TTL, the edit time and the resolver tested. Different caches may expire at different times; refreshing a page does not force upstream DNS caches to forget a record.

Worked example

A valid test record distinguishes “record saved”, “host verifies DNS”, “certificate ready” and “HTTPS page opens”. Those observations can happen at different times.

Extra implementation exercise

DNS verification passes but the browser reports a certificate error. Is the custom HTTPS domain ready to share?

Show a worked solution

No. Check the host’s certificate status and whether the requested hostname is covered. Do not tell visitors to ignore the browser’s certificate warning.

  • Keeps the HTTPS result unresolved.
  • Inspects certificate provisioning and hostname coverage.

Step 5

Repeat the visitor and mail checks

Verify the intended change without overlooking another service.

Open the final HTTPS page signed out and use its main link. Test existing mail if the domain already served it. Keep the saved old website settings as your restoration plan.

Record what changed, what passed and any unresolved state. Do not include account passwords or private tokens in the handoff.

A concrete example

A final record can have separate rows for primary HTTPS page, alternate-address behaviour and existing mail. “The homepage opens” does not answer whether a DNS edit disrupted a different service.

Files for this step

Start hereWorkshop files

Open or download the files below. When saving a project, keep the folder paths shown in the filenames.

How it works (optional)

Your assignment: connect and verify your domain

Produce a record of the change and the working address another person can open.

Apply only the planned records for your own site. After DNS and certificate provisioning complete, repeat the visitor test from a fresh window.

Keep a restoration plan based on the saved old values. Document any pending state honestly instead of repeatedly deleting and recreating records while caches are still updating.

Worked example

A concise handoff names the final URL, changed records and verification results. It does not contain your registrar password or a private account token.

The complete reference walkthrough is available in reference/assignment-walkthrough.txt. Compare its steps with your own result; fill the test record from observations in your own project.

Extra implementation exercise

Connect your domain or practice subdomain and document the final checks.

Show a worked solution

Illustrative route: keep an already working host URL, choose a www subdomain on a domain you control and ask that hosting project for its current CNAME requirements. Write down type, name and hostname target separately; never copy a scheme such as https:// into a CNAME target.

Before changing anything, record every existing website/mail record you might affect, including its current value and TTL. Mark unrelated MX/TXT records 'preserve'. Apply only the host-requested change at the authoritative DNS provider.

Expected checks are separate: saved DNS value matches the host request; host diagnostics verify the name; HTTPS opens the intended site; the alternate hostname redirects as configured; existing mail still works. A pending certificate stays pending. No real DNS record values or successful live observations are invented by this walkthrough.

  • Final page, certificate and chosen-hostname behavior are verified.
  • Existing email records remain intact and any unresolved issue is explicit.

Was this lesson useful?

Leave a like, or share it with someone who could use it.

Continue learning

Explore the other lessons