Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does the position of a slug in a URL matter?

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

like image 240
Shawn Miller Avatar asked Apr 07 '09 19:04

Shawn Miller


2 Answers

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.)

like image 122
chaos Avatar answered Oct 18 '22 16:10

chaos


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.

like image 28
Nick Berardi Avatar answered Oct 18 '22 16:10

Nick Berardi