THE SHORT ANSWER

Keep an established working hostname unless a concrete platform or business requirement justifies a change. Configure both routes to the intended site, choose one preferred HTTPS address and verify redirects, certificates and discovery signals.

Primary sources + editorial analysisSources & scope →
Two website hostname entrances converging on one secure canonical destination.

Choose one public website address, then make the other version lead to it reliably. For an established site, keeping the working version is usually the practical starting point. Adding or removing www is not a substitute for useful content, accessible pages and consistent links.

This guide uses official Google, Mozilla and certificate documentation checked on 13 October 2026. It explains the decision and verification process for www and non-www hostnames. The examples are fictional; we have not inspected your DNS, certificates or Search Console account, and no ranking improvement is promised.

Understand the two addresses

https://example.com/ and https://www.example.com/ use different hostnames. You can configure them to reach the same website, but they can also point to different applications or projects. Treat their setup as something to verify, rather than assuming a browser will add or remove www for you.

The preferred or canonical URL is the version you intend to use consistently. Google may choose a canonical when substantially similar content is available at multiple addresses. Your redirects, annotations and other signals can indicate a preference; they do not give you an unconditional command over Google’s selection. See Google’s canonical URL guidance.

For a small new site, choose the version your platform supports cleanly and use it in navigation and public materials. For an established site, review its current final URL, internal links and indexed information before changing anything. A cosmetic preference alone may not justify another migration.

Keep these four decisions separate

DecisionQuestion to answer
Domain registrationWho controls example.com and renews it?
DNS and platform routingWhere do example.com and www.example.com each lead?
HTTPSCan both hostnames establish a valid secure connection?
Canonical website addressWhich version serves the page, and which redirects?

A registration purchase does not answer every routing question. An email address at example.com also does not mean the website must use either particular hostname. Our domain versus hosting guide explains the underlying separation.

Check the existing behaviour before choosing

Open the site’s current homepage and one important inner page with and without www. Record the final browser address, visible content and any error. Then inspect the relevant platform’s domain settings to identify the intended primary address.

Suppose a fictional repair business already uses https://www.example.com/services/ in its navigation, customer messages and public profiles. If that route is working, first make the non-www version reach the same service page. Reversing the established preference simply because another site omits www adds work without demonstrating a business benefit.

If the two hostnames show different sites, pause. Confirm the domain and intended project before creating redirects. A redirect can hide an accidental project assignment from casual inspection while leaving the underlying account or hosting error unresolved.

Configure both hostnames at the correct layer

Follow the website platform’s specific domain instructions at the provider hosting the authoritative DNS. Keep a record of the existing configuration and confirm the target project. Do not replace working email records or nameservers merely to choose a website hostname; a separate mail or DNS migration requires its own plan.

A DNS alias and an HTTP redirect do different jobs. DNS can direct a hostname toward a service; the web service must still decide what response to return. Mozilla’s HTTP redirect explanation describes the redirect response that tells a browser to request another URL.

If a platform offers a primary-domain control, check whether it also configures the alternate hostname and its redirect. If a host, CDN and application each have redirect rules, give them the same destination. Maintain one understandable policy instead of several layers trying to undo one another.

HTTPS must work before relying on the redirect

Check certificate coverage for both hostnames you expect visitors to use. Mozilla explains that TLS server authentication binds a server’s certificate to its domain name. A broken secure connection at the alternate HTTPS address cannot be repaired by assuming the visitor will reach a later HTTP redirect. See TLS server authentication.

Certificate names matter: Let’s Encrypt’s certificate glossary explains Subject Alternative Names and notes that a wildcard for *.example.com covers www.example.com but not example.com itself. Inspect actual coverage rather than relying on a “wildcard” label.

Do not ask visitors to bypass a certificate warning. Resolve the affected hostname’s certificate and hosting configuration, then repeat the test. The homepage working securely at your preferred hostname does not prove that a saved alternate address is safe to open.

Redirect matching pages to the chosen version

For a permanent choice, Google recommends a server-side permanent redirect where possible; HTTP 301 and 308 identify permanent moves. See Google’s redirect guidance. Use a supported platform or server method rather than copying a rule intended for a different installation.

If www is preferred, the non-www /services/ address should reach the www /services/ page, not the homepage. If non-www is preferred, apply the same relationship in the other direction. Keep the requested page path and required query parameters intact where appropriate.

For a simple setup, aim to send an alternate HTTP or HTTPS URL directly to the final preferred HTTPS destination. Check the actual response chain: extra hops can come from separate www, HTTPS and trailing-slash rules. Avoid a loop where one layer adds www and another removes it.

Make discovery signals consistent

Use the preferred HTTPS address in internal links, sitemap entries and canonical metadata. Google’s canonical guidance warns against conflicting preferences across those methods and recommends linking consistently to canonical URLs. If a page has a canonical annotation, it should identify that page’s appropriate preferred URL.

Do not canonicalise every article to the homepage: that describes a different relationship from choosing one hostname for each article. Equally, using noindex or blocking crawling on the alternate hostname is not a replacement for a correct redirect and canonical policy.

Check important public profile links and campaign destinations you control. Updating them reduces dependence on redirects, while the alternate hostname should remain supported for bookmarks and existing external links.

Use Search Console to observe, not to force the prefix

Search Console no longer has the old Preferred Domain setting. Google retired it in 2019 and directs owners to canonical signals. Ignore instructions that require finding that obsolete control.

A Domain property includes protocols and subdomains, including www and non-www. A URL-prefix property covers its specified prefix. Choose the scope you need and follow its verification requirements; adding a property does not configure a website redirect. See Search Console property types.

For an important page, URL Inspection’s indexed data can show the user-declared and Google-selected canonical. Compare its crawl date with your change. A live test checks current accessibility and detectable issues, but cannot guarantee future canonical selection. See the URL Inspection guide.

Google’s current move documentation says Change of Address is not required when switching between www and non-www on the same domain. That is distinct from moving to another registered domain.

Run a small acceptance test

  • Test HTTP and HTTPS for both hostnames, at the homepage and one inner page.
  • Confirm the preferred HTTPS page serves the intended content without redirecting back.
  • Confirm the alternate versions reach the matching final page without a certificate warning or loop.
  • Inspect an important page’s canonical and sitemap entry for the same preferred hostname.
  • Check an essential form and any other workflow that depends on the public address.

Wrong site: inspect project assignment and routing. Certificate warning on one version: inspect its coverage. Loop: compare redirect layers. Google still shows another version: inspect the stored crawl and conflicting signals before making another change.

Keep the decision recorded with the domain’s operating notes and review it when changing platforms. Choose one reliable address, preserve the other route and verify the result at real pages. That gives readers a consistent way to reach the site without treating a prefix as an SEO shortcut.

Sources and verification

Editorial review 2026-10-13. Source check dates are recorded separately. Notes describe what each source supports and its limits.

View sources
  • Google: canonical URL consolidationChecked Google can select a canonical; redirect/canonical/sitemap/internal-link signals should be consistent; noindex or blocking is not a replacement for canonicalisation.
    Limits: Neither hostname is promised a ranking advantage, and declared preference does not guarantee Google-selected canonical.
  • Mozilla: HTTP redirectionsChecked HTTP redirect response directs the browser to another URL; permanent/temporary distinction and practical redirect-chain context.
    Limits: DNS configuration is not claimed to emit an HTTP redirect; no cross-host implementation or server rule copied.
  • Mozilla: TLS server authenticationChecked Certificate binds server authentication to domain name; HTTPS needs valid authentication at each hostname visited.
    Limits: No certificate inspected or trusted warning bypass advised; provider-specific automated issuance is not assumed.
  • Let's Encrypt: certificate glossaryChecked Subject Alternative Names and wildcard scope: *.example.com covers www.example.com, not the apex example.com.
    Limits: General certificate-name scope, not the reader certificate; no certificate request, key handling or hosting purchase performed.
  • Google: redirects and SearchChecked Server-side permanent 301/308 redirects for permanent URL moves.
    Limits: No universal rewrite rule or ranking-retention guarantee; paths/query needs require site-specific verification.
  • Google: Preferred Domain setting retirementChecked Preferred Domain setting retired in 2019; owners use canonical signals instead.
    Limits: Historical retirement event cross-checked with current canonical documentation, not legacy Webmaster Tools instructions.
  • Google: Search Console property scopeChecked Domain property covers protocols/subdomains; URL-prefix property is prefix-specific, with separate verification requirements.
    Limits: Adding or verifying a property does not configure DNS routing or website redirects.
  • Google: URL Inspection toolChecked Indexed user-declared/Google-selected canonical, crawl timing and limits of live testing for canonical prediction.
    Limits: No live test, account data or actual indexing status inspected; report guidance is not a success claim.
  • Google: moves with URL changesChecked Change of Address is not required for www/non-www switching on the same domain.
    Limits: Moving to another registered domain has a different procedure; no fixed migration timeline or traffic improvement claimed.