This isn't about where to put the id of a piece of unique content in URLs, but more about densely packing the URL (or, does it just not matter).

Take for example, a hypothetical post in a blog:


The ID that uniquely identifies this is 123456789. This corresponds to a look-up and is the direct key in the underlying data store.

However, I could encode that in say, hexadecimal, like so:


And that would be shorter.

One could take it even further and have more compact encodings; since URLs are case sensitive, one could imagine an encoding that uses numbers, lowercase and uppercase letters, for a base of 62 (26 upper case + 26 lower case + 10 digits):


For a resulting URL of:


The question is, does densely packing the ID of the content (the requirement is that an ID is mandatory for look-ups) have a negative impact on SEO (and dare I ask, might it have any positive impact), or is it just not worth the time?

Note that this is not for a URL shortening service, so saving space in the URL for browser limitation purposes is not an issue.

  • I get concerned when people worry this much about a URL. Considering all the things that you could do to improve a site from an SEO perspective (on-page/on-site) - worrying about a non-keyword component of a URL is something i'd recommend people ONLY consider if their site has been perfectly optimised (code/content/architecture/navigation/internal linking etc)... Commented Apr 8, 2012 at 9:00
  • @MikeHudson I don't disagree; being a developer though, you know how we are, we obsess sometimes over the completely wrong thing. A wake-up call such as this is always appreciated (and informative). However, your comment indicates that it might have a positive effect, or maybe I'm misinterpreting. You said only if all other aspects are perfectly optimized. Does that indicate that this might have an effect?
    – casperOne
    Commented Apr 8, 2012 at 15:33
  • I'd strongly suggest that it wouldn't, but am not confident enough to claim so outright - since I don't have definitive data to back me up. My point was that when considering what to optimize - we need to keep perspective on the big picture. Out of all the things you could look to optimize, i'd hope that you'd be recognising that transforming a non-keyword component of a URL is at the bottom of the priority list (even if to test the hypothesis that it might have some impact). Commented Apr 9, 2012 at 0:18

1 Answer 1


Generally speaking, it's not going to make a difference one way or another. The unique IDs won't affect your rankings directly unless you're actually trying to rank for search terms containing those IDs (you aren't). So their form isn't important to the search engines.

Where they can affect SEO is edge cases where you have a very long URL. Obviously if the search engines have a limit to how far they will read, and find the keywords in, a URL and you exceed it the keywords at the end of the URL will be invisible to them. Or less advanced search engines may cause the page not to be indexed at all. In these cases a shorter identifier would be a positive thing. But your URL would need to be very long for this really to be a factor (and well written software can easily prevent this from occurring in the first place).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.