top of page

WWW and trailing slash consistency, checked in five minutes

  • Aug 29
  • 3 min read

Updated: 1 day ago

Introduction


One page can be reachable with and without the leading prefix, with and without a trailing slash, and over secure and insecure connections. That is up to eight addresses serving identical content, and on a surprising number of sites several of them load without redirecting.

Nobody notices, because visitors follow links and see whichever version they were given. Search engines usually work it out. But inbound links get split between versions, analytics reports the same page under several separate rows, and occasionally the version that gets indexed is not the one you would have chosen.


1. WWW and trailing slash consistency means one address per page


State the objective plainly.

Every page should have exactly one working address, with every other form redirecting to it. Which form you choose matters far less than choosing one at all and then applying it consistently across every page, every link and every external reference to the site.


2. Test the variations yourself


The check takes five minutes.

Type your domain with the prefix, without it, with a trailing slash, without one, and over an insecure connection. Watch what happens in the address bar: each should redirect to a single form, and anything that loads without redirecting is a duplicate.


3. Pick either form of the prefix and commit


There is no better option.

Neither version carries any advantage. What matters is that one redirects to the other permanently, that internal links use the chosen one, and that nobody changes their mind later.


4. Be consistent about trailing slashes


The less obvious half.

Most platforms handle this automatically and some do not, particularly for pages generated by plugins or custom code. Both forms loading without a redirect creates duplicates that are unusually easy to miss, because the two pages look identical to anybody comparing them by eye.


5. Redirect insecure to secure everywhere


Non-negotiable and frequently incomplete.

Every insecure address should redirect to its secure equivalent, on every page rather than only the home page. Partial implementations are common and they leave a whole parallel set of addresses available.


6. Avoid chaining the redirects together


A detail worth getting right.

An insecure address without the prefix should reach the final form in one step, not three. Multiple hops add delay for anybody following an old link and are entirely avoidable with correct rules.


7. Make internal links use the canonical form


Otherwise every click is redirected.

Menu items, in-content links and images should point directly at the chosen form. This is usually a search and replace, and it removes a redirect from a large number of ordinary page views.


8. Check what your canonical tags declare


The second layer of the same question.

Each page should name its own canonical address in the chosen form. Pages declaring a different form from the one that actually resolves send a contradictory signal, which is worse than either inconsistency alone.


9. Update everything that points at your site


The parts outside the website.

Advertising destinations, email footers, business listings, social profiles and printed material. These all work through redirects, and correcting them removes an unnecessary hop for the traffic that matters most.

Re-check after any platform change or migration, since these rules live in server configuration that gets replaced wholesale. A site that was consistent for three years can quietly acquire four working versions of every page during a single afternoon of hosting changes.


Conclusion


Aim for exactly one working address per page, with every variation redirecting to it.

Test the prefix, the trailing slash and the insecure version yourself and watch what redirects, choose either prefix form and apply it permanently, handle trailing slashes consistently including on plugin-generated pages, redirect insecure to secure across the entire site, avoid chaining redirects so old links arrive in one hop, point internal links at the chosen form directly, make sure canonical tags declare the same form that actually resolves, update external listings and advertising destinations, and re-check after every migration.


Related reading


 
 
 

Comments


bottom of page