A a laugh deep dive from Zach. Do you might have an opinion on which you need to use?
1) https://site.com/foo/ 2) https://web sites.com/foo
The primary choice has a “trailing slash.” The second one does now not.
I’ve at all times most well-liked this pondering: you employ a trailing slash if that web page has kid pages (as in, it’s one thing of a listing web page, even supposing 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 follow it. Weblog posts in this website are like
css-tricks.com/blog-post/ with a trailing slash and if you happen to go away 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 supreme to have it occur as from time to time imaginable.
Efficiency is something, however search engine optimization is some other one. If you happen to render the similar content material, each with and and not using a trailing slash, that’s theoretically a replica content material penalty and a no-no. (Despite the fact that that turns out bizarre to me, I’d assume Google would sensible sufficient to not be extraordinarily involved by means of this.)
The place assets get to the bottom of to turns out like the largest deal to me. Right here’s Zach:
If you happen to’re the use of relative useful resource URLs, the property 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 explanation why the redirect is worthwhile. Can’t be having a web page with damaged assets for one thing this foolish.
What complicates that is that the site-building framework would possibly have critiques about this and a web hosting supplier would possibly have critiques about this. As Zach notes, there are some disagreements amongst hosts, so it’s one thing to look ahead to.
Me, I’d pass with the grain up to I perhaps may just. So long as redirects are in position and I don’t need to override any config, I’m cool.