A fun deep dive from Zach. Do you have an opinion on which you should use?
1) https://website.com/foo/
2) https://websites.com/foo
The first option has a “trailing slash.” The second does not.
I’ve always preferred this thinking: you use a trailing slash if that page has child pages (as in, it is something of a directory page, even if has unique content of its own). If it’s the end-of-the-line (of content), no trailing slash.
I say that, but this very site doesn’t practice it. Blog posts on this site are like css-tricks.com/blog-post/ with a trailing slash and if you leave off the trailing slash, WordPress will redirect to include it. That’s part of the reason Zach is interested here. Redirects come with a performance penalty, so it’s ideal to have it happen as infrequently possible.
Performance is one thing, but SEO is another one. If you render the same content, both with and without a trailing slash, that’s theoretically a duplicate content penalty and a no-no. (Although that seems weird to me, I would think Google would smart enough not to be terribly concerned by this.)
Where resources resolve to seems like the biggest deal to me. Here’s Zach:
If you’re using relative resource URLs, the assets may be missing on Vercel, Render, and Azure Static Web Apps (depending on which duplicated endpoint you’ve visited).
<img src="image.avif">on/resource/resolves to/resource/image.avif
<img src="image.avif">on/resourceresolves to/image.avif
That’s a non-trivial difference and, to me, a reason the redirect is worth it. Can’t be having a page with broken resources for something this silly.
What complicates this is that the site-building framework might have opinions about this and a hosting provider might have opinions about this. As Zach notes, there are some disagreements among hosts, so it’s something to watch for.
Me, I’d go with the grain as much as I possibly could. As long as redirects are in place and I don’t have to override any config, I’m cool.



WordPress will redirect to whatever version you have set in your Permalink Settings. If you don’t include a trailing slash (
/%postname), WordPress will do a 301 redirect from/test/to/test, and vice versa if you do.Although I suppose no redirect, and inclusion of the
<link rel="canonical" href="/test">would be the most performant and not incur SEO penalty (from respectful search engines).As I understand it, both addresses actually are incomplete.
site.com/pageshould besite.com/page.php(or .html) and thesite.com/page/should besite.com/page/index.php(or .html).If you leave away the file extension or even the document name you maybe should at least get the slash right.
Nahhhh. You can link to a file if you want to but it’s not required and extensions are just for you and tools, browsers and the internet don’t care.