A enjoyable deep dive from Zach. Do you will have an opinion on which you need to use?
1) https://web site.com/foo/ 2) https://web sites.com/foo
The primary possibility has a “trailing slash.” The second doesn’t.
I’ve all the time most popular this considering: you employ a trailing slash if that web page has youngster pages (as in, it’s one thing of a listing web page, even when has distinctive content material of its personal). If it’s the end-of-the-line (of content material), no trailing slash.
I say that, however this very website doesn’t apply it. Weblog posts on this website are like
css-tricks.com/blog-post/ with a trailing slash and should you depart off the trailing slash, WordPress will redirect to incorporate it. That’s a part of the rationale Zach is right here. Redirects include a efficiency penalty, so it’s preferrred to have it occur as sometimes attainable.
Efficiency is one factor, however web optimization is one other one. Should you render the identical content material, each with and and not using a trailing slash, that’s theoretically a replica content material penalty and a no-no. (Though that appears bizarre to me, I might assume Google would sensible sufficient to not be terribly involved by this.)
The place sources resolve to looks as if the largest deal to me. Right here’s Zach:
Should you’re utilizing relative useful resource URLs, the belongings could also be lacking on Vercel, Render, and Azure Static Internet Apps (relying on which duplicated endpoint you’ve visited).
/useful resource/resolves to
/useful resourceresolves to
That’s a non-trivial distinction and, to me, a cause the redirect is price it. Can’t be having a web page with damaged sources for one thing this foolish.
What complicates that is that the site-building framework might need opinions about this and a internet hosting supplier might need opinions about this. As Zach notes, there are some disagreements amongst hosts, so it’s one thing to look at for.
Me, I’d go along with the grain as a lot as I presumably may. So long as redirects are in place and I don’t need to override any config, I’m cool.