FOR SEARCH ENGINE OPTIMIZATION PURPOSES, does the location of the slug within a URL matter?
There's no doubt that you could code URL slugs to work properly in any order. I'm more interested to know if search engines place different weights to portions of the URL on the right-hand-side vs the left-hand-side
For example, here the slug appears at the end of the URL: Why do some websites add "Slugs" to the end of URLs?
Whereas here the slug appears in the middle of the URL: https://stackoverflow.com/questions/why-do-some-websites-add-slugs-to-the-end-of-urls/47427
It's better to push whatever has less semantic content to the right because it's more likely to get chopped off by length limits on what's considered relevant. So the second form you post would be better for SEO purposes than the way SO does it. (Better yet is using the slug as a real identifier and keeping semantic-content-free IDs out of it.)
I always go with the Rule that it is important to move from right to left when determining the most important information in your URL for the user (an actual user or google). So the question you have to ask your self, is do you want your user to see the ID or the title as the most important thing of the page.
Also what happens if they drop off the number, and just leave the title. The page blows up right, but what happens if you drop the slug and leave the number. The page functions as normal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With