# My domain works without www but not with it

> Fix a site that loads at example.com but not www.example.com (or the other way round), and choose one main address.

Source: https://helpcenter.ruachost.com/domains/dns/domain-works-without-www/

`example.com` and `www.example.com` are two separate names in DNS. Each needs its own record. If one works and the other doesn't, a record is usually missing or pointing to the wrong place.

## Check the records

In the client area go to **Domains → Manage DNS** and edit your domain, or use cPanel's **Zone Editor**. You need:

| Name | Type | Value |
| --- | --- | --- |
| `@` | A | Your hosting IP address |
| `www` | CNAME | `example.com` (your domain) |

Add whichever is missing. Remove any other A, AAAA or CNAME record for `www` that points somewhere else.

If your website is on Shopify, Wix or another platform, use the values that platform gives you. See [Connecting your domain to website builders](https://helpcenter.ruachost.com/domains/dns/connecting-your-domain-to-website-builders/).

> **Note:**
If your nameservers aren't Ruachost's, make these changes at your DNS provider instead. See [My DNS changes aren't working](https://helpcenter.ruachost.com/domains/dns/dns-changes-not-working/).

## Check that the domain is added to your hosting

In cPanel, open **Domains** and make sure your domain is listed. cPanel serves both `example.com` and `www.example.com` for every domain added there.

## Check SSL

If `www` shows a security warning, the SSL certificate may not cover it yet. Open **SSL/TLS Status** in cPanel and click **Run AutoSSL**. Once the DNS record works, AutoSSL includes `www` automatically.

## Pick one main address

It's best for search engines if your site uses one address and redirects the other to it:

- **WordPress:** set your preferred address in **Settings → General**. WordPress redirects the other version automatically.
- **Other sites:** add a redirect in cPanel's **Redirects** tool, or in `.htaccess`. See [Adding or removing the www prefix in domain URLs](https://helpcenter.ruachost.com/developers/web-servers/adding-or-removing-the-www-prefix-in-domain-urls/).

Allow a few hours for DNS changes to spread. See [DNS propagation explained](https://helpcenter.ruachost.com/domains/dns/when-can-i-see-changes-in-my-domain-if-i-just-edited-my-dns-records/).
