Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"items" isn't very useful.

Have either:

example.com/<article_title>

or, if categories exist:

example.com/<category_name>/<article_name>



A poor exemple doesn't make for a poor argument. I like hierarchical URLs because they allow me to try and find more content by stripping the end of the URL fo see what is up the hierarchy.


This sounds more like a workaround to a website with poor navigation and UX, but ultimately you are still at the mercy of the website, eg if they have /articles/<title> links but throw 404 when you try to access /articles directly. It's up to the website to choose how navigation works, and I don't think we should constrain the structure of website urls just to support these hacky workarounds.

Now there are other reasons for hierarchal urls mentioned in the thread, like providing better semantic meaning when representing content that is already hierarchal. Though I find that that is rarely the case. For example, you might think to represent blog posts like myblog.com/articles/<title>. But you could also do it like myblog.com/<article year>/title (eg myblog.com/2017/why-choose-short-urls). I've seen both formats, and both are valid to a certain degree. So choosing one is a bit arbitrary. But if you allow both formats, that just pushes the ambiguity onto the user. For example if the user wants to bookmark the article, which url do they bookmark?

From my experience, data follows graph structures, so trying to force a hierarchal structure and doing things like encoding paths in urls, feels too arbitrary and adds unnecessary ambiguity.


> It's up to the website to choose how navigation works

Yes, and they should live by their choice and implement whatever is implied by their semantics.

URLs also have their own affordances and I expect to be able to act upon them.


Url hacking is a clunky and extremely uncommon method of navigation. It should be the least of the website's concern. We don't design our doors based around the 0.01% of people that get in by kicking them down.


I agree. Also, images that are meant to be included in your articles can still have long urls if you want. Unless those images are urls you want to share, of course; it's about sharing urls, and that's much easier to do when they're short.

If you've got a CMS, I suppose you could do both: store each article in its hierarchical place, but also give each article (or each article you consider important enough to share, but I would hope that's all of them) a short name through which it can easily be remembered and shared.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: