> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hostcloud.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Fix a site that works with www but not without (or the reverse)

> Make both yourdomain.com and www.yourdomain.com open your website.

If `www.yourdomain.com` opens your website but `yourdomain.com` doesn't, or the other way round, one of the two is missing a DNS record or an SSL certificate. This guide helps you find which and fix it.

> [!NOTE]
>
> `yourdomain.com` and `www.yourdomain.com` are two separate addresses. Each needs its own DNS record.

## Step 1: Check where your DNS is managed

Where you fix this depends on your nameservers. See [Where to edit your DNS](https://kb.hostcloud.in/dns/where-to-edit-dns.md).

* **Domain uses HostCloud nameservers:** edit DNS in cPanel → **Zone Editor**.
* **Domain uses Cloudflare or another DNS provider:** edit DNS there.

## Step 2: Check both records exist

**1. Open your DNS records**

In cPanel, open **Zone Editor** and click **Manage** next to your domain. Or open the DNS page at your DNS provider.

**2. Check the main domain**

There should be an `A` record for `yourdomain.com` pointing to your hosting's IP address.

**3. Check www**

There should be a record for `www.yourdomain.com`: either a `CNAME` pointing to `yourdomain.com`, or an `A` record with the same IP address as the main domain.

**4. Add whichever is missing**

Add the missing record and save it. See [Add DNS records](https://kb.hostcloud.in/dns/add-dns-records.md).

DNS changes can take a few hours to show everywhere. See [DNS propagation](https://kb.hostcloud.in/dns/dns-propagation.md). To see the change sooner on your own computer, [clear your DNS cache](https://kb.hostcloud.in/troubleshooting/clear-dns-cache.md).

## Step 3: Check for a security warning

If one address opens but shows a "Not secure" or "Your connection is not private" warning, its SSL certificate doesn't cover that address yet. Once both DNS records point to HostCloud, free AutoSSL adds a certificate for both automatically. See [Free SSL with AutoSSL](https://kb.hostcloud.in/ssl/free-autossl.md).

## Step 4: WordPress sites

WordPress sends visitors to the address saved in its settings. In the WordPress dashboard, go to **Settings → General** and check that **WordPress Address (URL)** and **Site Address (URL)** match the address you want to use, with or without `www`.

> [!WARNING]
>
> A typo in these two fields can lock you out of the dashboard. Copy the address carefully, then click **Save Changes**.

Still stuck? [Open a ticket](https://kb.hostcloud.in/support/open-a-ticket.md) with your domain name and which address isn't working.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.