Skip to content
hostcomplex

WWW vs Non-WWW

Maarten Soetens 2 min read

What Is the Difference Between www and Non-WWW?

www vs non-www is a question about which hostname a site uses: the version with the www prefix or the bare domain without it. The www prefix is a subdomain, so www.example.com and example.com are technically different hostnames. The version without www is often called the bare or apex domain.

Both can point to the same server and serve the same site, so visitors can reach it either way. Search engines treat the two hostnames as separate addresses, however. If both serve the same pages, they can create duplicate content and divide links between them.

Does Google Prefer One Version Over the Other?

Google has said it does not favor the www or non-www form, and adding or removing the prefix does not improve rankings by itself. What matters is consistency. The version a site chooses should be used in internal links, sitemaps, redirects and canonical tags, so that one address collects the signals.

The two forms differ in a few technical ways. Cookies set on a bare domain are sent to all of its subdomains, including www, while cookies set on www stay on that host. Some sites use this to serve static files from a separate host without cookies. The bare domain also cannot use a CNAME record in standard DNS, which limits how it can be pointed to some hosting services.

Choosing and Keeping One Version

Take a company whose site has long been reachable at both example.com and www.example.com. Its emails link to the bare domain, while older partner links use www. Analytics and search reports split the history between the two. After choosing the www version, the company sets permanent redirects from the bare domain and updates its own links to match.

Once chosen, the preferred form should stay the same. Changing it later means another round of redirects and short-term changes in how search engines show the site. For how redirect types differ, see 301 vs 302 redirects.

Frequently asked questions

Should I use www or non-www for my site?

Either works for SEO. Choose the form that fits your brand, your email setup and your hosting, then use it everywhere. Decide early, because changing later requires redirects on every page and can cause temporary fluctuations in search results.

Will switching between www and non-www hurt my rankings?

It can cause temporary changes if handled badly. Use permanent (301) redirects from the old version to the new one, keep internal links and sitemaps pointing to the chosen version, and expect search engines to take time to process the change. Done consistently, the impact is usually small.

  • Two-Factor Authentication

    Two factor authentication hosting adds a second check to control panel, domain and CMS logins. Learn which methods are strongest and why 2FA helps.

  • What Is an A Record?

    What is an A record? Learn how this DNS record maps a hostname to an IPv4 address, why domains use several A records and the root and www pattern.

  • Billing and Automation Platforms

    What is WHMCS? Learn how this commercial billing and automation platform helps hosts sell plans, collect payments and create accounts automatically.