swyxio / swyxdotio

This is the repo for swyx's blog - Blog content is created in github issues, then posted on swyx.io as blog pages! Comment/watch to follow along my blog within GitHub
https://swyx.io
MIT License
336 stars 45 forks source link

Against Namespacing Personal Sites #325

Closed swyxio closed 2 years ago

swyxio commented 2 years ago

source: devto devToUrl: "https://dev.to/swyx/against-namespacing-personal-sites-23h2" devToReactions: 32 devToReadingTime: 2 devToPublishedAt: "2020-09-09T22:15:08.065Z" devToViewsCount: 1358 title: Against Namespacing Personal Sites published: true description: I care a lot about creating Cool URIs so I have been paralyzed more than I should be about what I'm calling "URL Architecture". In true fashion, I'm blogging about it. category: tutorial tags: Reflections, Advice, Meta slug: namespacing-sites canonical_url: https://www.swyx.io/writing/namespacing-sites

I'm about to rewrite my personal site (for hopefully the last time for a long while - UPDATE: 2022 rewrite blogpost here). I have been paralyzed more than I should be about what I'm calling "URL Architecture". Because I care about Cool URIs, this is ideally not a reversible decision.

After some agonizing I think I have decided on a URL Architecture I like. In true fashion, I'm blogging about it.

"URL Architecture" (I don't know the proper word for this, if there is one pls correct me) is how you set up your URLs for each page of your site. For example, netlify.com has these:

I call that /blog a namespace. The reason you do this is simple: it GREATLY reduces the risk of clashing with any other page you could possibly put on your site. It is "future proof".

Note: There is some debate about whether or not putting year/month/day in the URL impacts SEO. Some think it doesn't matter, some think it's a mild negative, some like it because you avoid clashes at the slug level.

Personal sites of frequent speakers often opt for TWO namespaces: /writing and /speaking. My current site (as of Sept 2020) uses this, but I have grown to dislike it: I will often speak about what I write, and write about related things I speak about. Why separate them? It is more effort to make my talks discoverable to my readers and vice versa.

The other thing that bothers me about my current setup is that it makes for ugly URLs. My most popular essay ever regularly gets linked to in Slacks, Discords, YouTube chats, Tweets and presentation slides. It weighs in at 43 characters all told.

If I shortened it to the shortcode that I set up for myself, swyx.io/LIP, it is only 11 characters. This looks much better.

I've noticed that a lot of prolific bloggers don't namespace:

These people have blogged for decades and somehow managed to find their way around possible URL clashes. Why can't I?

swyxio commented 2 years ago

Derek also blooged this recently https://sive.rs/su

Short URLs matter for a few reasons:

  • I can remember my URLs.
  • I can type it or say it.
  • They look nicer.
  • They remove the middle-man.
  • They’re enough.