0

We are planning our URL structure and currently deciding between two options:

https://contra.com/[short, non-descriptive namespace]/[uid]-[slug]

e.g. https://contra.com/o/RYlUgZeo-contra-landing-pages

and

https://contra.com/[descriptive namespace]/[uid]-[slug]

e.g. https://contra.com/work-opportunity/RYlUgZeo-contra-landing-pages

One of the URL design goals is to have uid as close to the root as possible. The reason is that such design ensures that whatever changes we make to URL schema, the original content can always be accessed, i.e. all of these URLs should access the same content

and redirect to whichever is the canonical URL.

The second goal is to make content title visible in the URL as early as possible. The ultimate goal is that results in Google should appear as:

enter image description here

Finally, the third option that we are considering is to make prefix part of the UID, i.e. The URL would become:

https://contra.com/oRYlUgZeo-contra-landing-pages

What URL schema design would get us closest to our design goals?

3
  • 3
    I recommend using numeric IDs rather than alphabetic IDs in URLs because users can read past them to find the words much more easily. Alphabetic IDs look like gobbledygook and negate the benefits of having words in your URLs. Jun 3, 2021 at 21:32
  • My counter argument is that numeric IDs will get a lot longer. Twitter is great example of where it gets out of hand twitter.com/Unusual_VC/status/1400478303715094531
    – Gajus
    Jun 3, 2021 at 22:13
  • 2
    There is no need for such larger numbers. Even Twitter doesn't have 1.4 quintillion posts. For most sites a 6 digit identifier will cover more URLs than the site will ever have. Jun 4, 2021 at 0:36

2 Answers 2

3

What will the actual slugs be?

From an SEO standpoint, there is effectively no difference between options 1 and 3. So if it is between those, I would use whichever works best with your backend.

Option 2 gives you the benefit of a little more human readability, which could be useful depending on what the slugs will be.

The example slugs you've provided are relatively short, but maybe most of the time the slugs end up being 50 or more characters? In those cases, a user finding your links externally likely is getting plenty of context with the slug alone, assuming it is human readable.

Given that option 2 offers a little more context to users who may be finding your links externally, and that it still is not a long URL (given the example slugs you've provided) I would use option 2. But if the slugs will provide more context, and if they potentially could be long, then option 1 or 3.

The big caveat to all this is that Google doesn't care about URL length, but the more spammy a URL looks, the less likely users are to link to it. The examples you've provided don't look too spammy so I think you're ok there, but I would heed the advice from Stephen Ostermiller in his comment if possible.

Lastly, URL structure by itself is less important to SEO than how your URLs are linked throughout your site.

2
  • Thanks. I am evaluating this from the perspective of which URLs Google is going to be the most able to collapse, i.e. instead of showing URL https://contra.com/work-opportunity/RYlUgZeo-contra-landing-pages show a meaningful shortened version. In this case, ideally contra.com › contra-landing-pages
    – Gajus
    Jun 3, 2021 at 23:10
  • @Gajus -- the URL, in addition to being collapsed, will be truncated at 50 to 55 characters. Google will typically show the most relevant, readable text in the URL portion of the snippet, and often skips directories that are less relevant, but it doesn't typically transform the names of folders themselves. So the only times I see the text like "RYlUgZeo" is if it is 1. within 50-55 chars, 2. attached to more relevant text, and 3. there are not other relevant subfolders to display. So I would isolate "RYlUgZeo" into its own folder, or ensure it occurs after 55 chars each time.
    – Jake 1986
    Jun 26, 2021 at 11:27
1

I would say it depends. Part of answering this question is trying to divine or figure out the algorithms that the various SE's use. In my own experience I've tended to see better results with easy to read words in the URL's but that's just my experience and YMMV.

P.S. Youtube uses very short base 64 (i think?) id's in the URL's. (If not i'm remembering right look up the Tom Scott video about it) Anyway point is if you can have a very short namespace or post id.

IMO, having words in the URL has helped out a tiny bit with SEO and every little bit helps but maybe it really does not make any difference as someone else has already pointed out.

SEO aside, I think it adds to the user experience to have URL's with words in them that are not too long.

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.