www, https and trailing slashes: one address per page
Short answer: Pick one version of every address (https, either with or without "www", and one trailing-slash style) and make every other version 301-redirect to it. Then use that version everywhere you control: internal links, the sitemap and canonical tags. Google can cope with duplicates on its own, but consistent signals make it far more likely the address you want is the one that shows in search.
Most small sites can be reached in more variations than their owners realise. Type the domain four different ways and you may get four working copies of the same homepage. Below are the symptoms that usually reveal the problem, what causes each one, and the fix.
Why this matters at all
Google's documentation on consolidating duplicate URLs lists the methods you can use to tell it which version of a page you prefer, in order of strength: redirects are a strong signal, rel="canonical" annotations are a strong signal, and including a URL in your sitemap is a weak signal. It adds that these methods stack, so they work better together.
On slashes specifically, a Google Search Central blog post on the subject explains that Google treats example.com/foo/ and example.com/foo as separate URLs, while the bare root (example.com and example.com/) is equivalent. So the homepage is safe, but every inner page can, in principle, exist twice.
None of this is a penalty. It is a question of which address collects the links, appears in results and shows up in your analytics.
Symptom → cause → fix
Symptom: your analytics shows the same page under two addresses
Cause: Both /services and /services/ return a normal page (a 200 response). Visitors, old links or your own menu use both.
Fix: Choose one style. Google's post notes it doesn't matter which you choose as long as you are consistent. If your CMS already generates one style by default (WordPress, for example, follows the permalink setting you choose), go with that. Add a 301 redirect from the other style. Where a redirect is impossible, a canonical tag pointing to the preferred version is the fallback.
Symptom: Search Console shows "www" and "non-www" URLs
Cause: Your hosting answers on both www.example.co.nz and example.co.nz without redirecting one to the other. Sometimes the domain was set up years ago by one person and the hosting by another.
Fix: Decide which host is primary. There's no ranking reason to prefer either; many businesses keep "www" because it reads naturally on printed material, others prefer the shorter form. Set a site-wide 301 from the other host, usually at your host, CDN or DNS provider level rather than inside the CMS, so it works for every path, not just pages the CMS knows about.
Symptom: old "http" links still load without the padlock
Cause: The site has a certificate but plain http requests are still served instead of being redirected.
Fix: Redirect every http request to the https version of the same path. Combine it with the host redirect so http://example.co.nz/about goes straight to https://www.example.co.nz/about/ (or whatever your preferred form is) in one hop rather than two or three.
Symptom: the redirect works, but Google still shows the "wrong" version
Cause: Your own site keeps sending mixed signals. The menu links to one form, the footer to another, the sitemap lists a third, and the canonical tag says something else.
Fix: Audit the signals you control:
- Internal links: menus, buttons, footers and links inside blog posts should all use the preferred version. Hard-coded links in old posts are the usual culprit.
- Sitemap: list only preferred URLs. Google's slash post says to include the preferred version in your sitemap and leave out the duplicate.
- Canonical tags: each page's canonical should point at its own preferred address, not at an http or non-www variant left over from an old template.
Then give it time; Google needs to recrawl the pages to see the change.
Symptom: some pages redirect two or three times
Cause: Rules were added at different times. One converts http to https, a second adds "www", a third adds the slash.
Fix: Collapse the rules so any variation reaches the final address in a single redirect. Each extra hop adds a little delay and another place for something to break.
Symptom: query strings create endless copies
Cause: Tracking parameters (?utm_source=…, ?gclid=…) or session IDs are appended to links. Google's duplicate-URL page uses this exact example: a product page reached through a URL with a gclid parameter rather than its clean address.
Fix: Don't redirect these away, since your campaign tracking may rely on them; make sure the page's canonical tag points at the clean URL, and keep parameters out of internal links.
A ten-minute test you can run yourself
Open a private browser window and try these, noting where each one ends up:
http://yourdomainhttp://www.yourdomainhttps://yourdomainhttps://www.yourdomain- An inner page with and without a trailing slash
- The same inner page with "www" removed or added
All of them should land on exactly the same final address. If any returns a page without changing the address bar, you have a duplicate. Free online header checkers will also show the number of redirect hops and their type (301 or 302).
What not to do
- Don't switch styles on a whim. Changing from slashes to no slashes on an established site means every URL redirects. Fine if needed, pointless if not.
- Don't block duplicates in robots.txt. If Google can't crawl the duplicate, it can't see the redirect or canonical telling it where to go.
- Don't rely on a canonical tag alone when you can redirect. Redirects send visitors to the right place too; a canonical only advises search engines.
FAQ
Is "www" or "non-www" better for SEO?
Neither. What matters is choosing one, redirecting the other to it, and using it consistently in links, sitemaps and canonical tags.
Does a trailing slash affect rankings?
Not as such. Google treats the two forms as separate URLs, so serving both splits signals across duplicates. Pick one and redirect the other.
Should I use 301 or 302 redirects for this?
For a permanent choice of address, a 301 is the conventional, clear signal. Google's slash post notes that in the slash case results will likely show the version returning the 200 response either way, but a 301 states your intent plainly.
Do I need to tell Google after fixing this?
You can submit an updated sitemap in Search Console so the preferred URLs are recrawled sooner. Otherwise, Google picks up redirects as it recrawls.
Seeing two or three versions of your pages when you run the test above? Send us the addresses and we'll map out the single set of redirects you need.