# Connect a custom domain with SSL, including the apex

Source: https://naijacloud.com/guides/custom-domain-apex

This guide connects your own domain to a Naijacloud web service or static site, both the apex (example.com) and www.example.com, with HTTPS certificates issued and renewed for you. At the end both names load your app over HTTPS, www redirects to the apex, and your naijacloud.app address keeps working. It works with any DNS provider; the only tool is your provider’s DNS settings page.

_10 min · Beginner · Last verified 2026-10-07 · Stack: dns_

**What you'll have at the end:** https://example.com serving your app with a valid certificate, https://www.example.com redirecting to it, and nothing else about the service changed.

## Before you start

- A service that’s already live at its naijacloud.app address. Any web service or static site works; this guide uses one called `shop`.
- A domain, and access to its DNS records at your provider. You can also [register a domain on Naijacloud](https://naijacloud.com/docs/domains/registering.md), which puts its DNS here too.

## Add the domain to the service

Open the service and go to **Domains**. The first row is the **Default domain**, `shop.naijacloud.app`, already **Verified · HTTPS ready**. Your domain goes on top of it; the default keeps working.

Type `example.com` into **Custom domain** and click **Add domain**. Because it’s a root domain, the dashboard also offers to connect `www.example.com`: click **Add www**, and `www` redirects to the apex.

## Read the records it shows

Each domain lists the DNS records it needs in a table with **Type**, **Name** and **Value** columns, and a copy button on every value. What you see depends on the domain and the region the service runs in:

- **An A record** for a root domain, and in some regions for every domain. Its value is an IP address.
- **A CNAME** for a subdomain in regions that use one, often with **TXT** records beside it. Those prove you own the domain and let the certificate be issued.

Use the values in the table, not ones from another guide or another service. They’re specific to where your service runs.

> **Warning: One answer per name**
>
> If the name already has records pointing somewhere else (an old host’s A records, for example), replace them rather than adding ours alongside. Two A records for the same name send half your visitors to each server. The table flags records that are in the way.

## Create the records at your provider

At your DNS provider, add each record exactly as shown, one by one. For the `Name`, providers differ: some want the full name (`www.example.com`), others only the part before your domain (`www`), and `@` for the root.

> **Warning: Turn the provider’s proxy off for these records**
>
> If your DNS provider can proxy traffic (Cloudflare’s orange cloud, for example), switch it off for these records. With the proxy on, the domain can’t be verified and HTTPS can’t be set up.

## Wait for verification and HTTPS

Back on **Domains**, each new domain shows **Waiting for DNS…**. It checks again on its own, and **Check now** checks immediately. When your records resolve, the certificate is issued and the status changes to **Verified · HTTPS ready**.

Most changes show up within minutes. A record that had a long TTL before you changed it can take as long as that TTL to update everywhere, which is why the [migration guides](https://naijacloud.com/guides/topic/migrations.md) lower the TTL a day or two ahead.

## Check both names

Open `https://example.com`: it loads your app with a valid certificate. Open `https://www.example.com`: it lands on `https://example.com`. Certificates renew on their own; there’s nothing to schedule.

To remove a domain later, click **Remove** on its row and confirm with **Remove domain**, then delete the records at your provider.

## Reference

- [Custom domains](https://naijacloud.com/docs/domains/custom-domains.md)
- [DNS](https://naijacloud.com/docs/domains/dns.md)
- [Register a domain](https://naijacloud.com/docs/domains/registering.md)

All guides: https://naijacloud.com/guides · Index for agents: https://naijacloud.com/llms.txt
