Welcome! New to Spiderz? Get 40% off your first purchase.

Should your website use www or the bare domain?

Customers will type both. The choice between www and the bare domain matters less than making sure both addresses end up in the same place, securely.

Print yourdomain.com on a business card and some people will still type www.yourdomain.com. Put www on your shopfront and others will leave it off. Customers don't think about it, and they shouldn't have to: both should simply work.

So the real question isn't which one is right. Either is fine. It's which one you treat as home, and how the other one gets visitors there.

Two names, not one

The bare domain, sometimes called the root or apex, is the name on its own: yourdomain.com. www.yourdomain.com is a separate name underneath it, in the same way shop.yourdomain.com would be.

To the internet, they're two different addresses. Each needs its own DNS record, its own certificate coverage, and a server that knows to answer for it. That's why one can work while the other shows a parking page or a certificate warning.

Which to choose

If your site already exists, keep the address it uses now: the one in your links, search results, emails and printed material. Changing it brings work and little benefit.

If it's new, choose what you like the look of. The bare domain is shorter and reads cleanly. www is instantly recognisable as a website and sits comfortably on print. Neither is better for search or speed on its own.

What matters far more is that you choose, and stick to it everywhere.

Make the other address lead home

Once you've chosen, the other address should send visitors to it with a redirect, an instruction from the server to go to another address. A visitor to http://www.yourdomain.com/contact should end up at https://yourdomain.com/contact: secure, at your chosen name, on the same page.

Visitor opens They should end up at
http://yourdomain.com/contact https://yourdomain.com/contact
https://www.yourdomain.com/contact https://yourdomain.com/contact
http://www.yourdomain.com/contact https://yourdomain.com/contact

Swap the names if you chose www. Either way, notice that the page stays the same. A redirect that drops everyone on the home page makes the opening screen look fine while breaking every link to the rest of your site.

An alias isn't a redirect

It's common to point www at the bare domain with a CNAME record, a DNS alias. That makes www reach the same server, which is useful. But it doesn't change the address in the browser: a visitor who typed www stays on www. Only a redirect, set on the website or the server, moves them. DNS records explained covers the difference.

HTTPS comes before the redirect

Here's the part that trips people up. When someone opens https://www.yourdomain.com, the browser sets up a secure connection to that exact name before it ever sees your redirect. If the certificate doesn't cover www, they get a warning and never reach the redirect.

So the name you redirect from still needs a valid certificate. On Spiderz, the free certificate covers both the bare domain and www, as long as both point to your hosting. If one shows a warning, check HTTPS after connecting your domain.

One place in charge of redirects

Redirects can be set in your website, in .htaccess, in cPanel or in a service such as Cloudflare. Trouble starts when two of them disagree: your site sends visitors from www to the bare domain, Cloudflare sends them back to www, and the browser gives up with "too many redirects".

Pick one place to own the rule, and remove the others. Use a permanent redirect (301) once you've tested it, so search engines treat the chosen address as the real one. Google explains how it picks the main address for a page.

Use the chosen address everywhere

Then make your own site agree with itself. Use your chosen address in menus, sitemaps and the canonical tag, which tells search engines which address is the main one. If your site uses a sign-in service, payments or other outside tools, update their return addresses too.

Check it like a visitor

Try all four versions of a real inner page: with and without www, with http and https. Each should land on the same page, at your chosen address, without a warning or a loop.

If one ends up on a different site entirely, Your domain shows the wrong website helps you find out why.

Once all four land in the same place, it no longer matters what your customers type.