Back
Question
What’s the best URL structure for WIP Questions? #wip
Right now the URL of this question has just the ID: https://wip.chat/questions/639
I think it would be good to add more descriptive slugs. Both for SEO purposes, but also to give people a better indication of what the question is about when shared on platforms where there's no preview.
I'm considering a few options:
Any suggestions/feedback/experience?
I think it would be good to add more descriptive slugs. Both for SEO purposes, but also to give people a better indication of what the question is about when shared on platforms where there's no preview.
I'm considering a few options:
- ID-slug, e.g. https://wip.chat/questions/639-whats-the-best-url-structure-for-wip-questions
- slug-ID, e.g. https://wip.chat/questions/whats-the-best-url-structure-for-wip-questions-639
- slug, e.g. https://wip.chat/questions/whats-the-best-url-structure-for-wip-questions
Any suggestions/feedback/experience?
👋 Join WIP to participate
Using just the slug without an ID is the most descriptive* and probably most SEO-friendly. The downside is that we need save the slug and any historical ones in order to retrieve the related question. In Rails this is pretty straightforward though using the FriendlyId gem.
(* the ID does however suggest how old the question is. A lower ID means an older question. I'm not sure if that's an advantage or disadvantage. Probably doesn't matter that much. )
Slug-ID or the one like Medium does (Slug-BigUniqueID). The advantage is that 2 questions can be same so only way to differentiate is by unique IDs :)
Thanks! I think having duplicate questions won't happen too often (because why ask the same question twice?), but I do indeed need to keep it mind for when it does happen.
I'm thinking of just adding an incrementing number to the end of the slug (e.g. "foo-bar" for the original question, and "foo-bar-2" for the duplicate question)
That might work too.
It will happen because there is no search yet so it depends when you will implement it. But again nobody searches because its harder than directly asking (personal opinion because that's what I do all the time on StackOverflow 😂)
For it not to happen you will need a similar questions functionality like StackOverflow
Yeah good point on the search. That's planned.
For what it's worth, searching is often quicker because you might find an existing answer.
Update: Added slugs :)