Short URLs: why and how
2022-05-08If you make your own website, consider making short URLs.
This is not about a URL shortener. This is about making your original URLs short in the first place.
Instead of:
yoursite.com/blog/2022/05/08/short-urls-why-and-how.html
… consider just:
yoursite.com/short
Why?
Short URLs matter for a few reasons:
- I can remember my URLs. I can avoid the search engine step. (No need to search when I already know the answer.) Which means…
- I can type it or say it. Whether texting, answering an email, or talking to someone on the phone, I can say, “Go to sive.rs/ff for my talk about the first follower.” or “My newest book is at sive.rs/h.” I do this often, so having memorable URLs, easy to type in full, saves me a lot of searching.
- They look nicer. They’re aesthetic. They show care. We should put something of beauty into the world, instead of creating digital pollution.
- They remove the middle-man. With long URLs, people use those ugly social share buttons that promote (and further entrench) harmful social media sites, and add visual clutter to your site. Short URLs encourage people to copy and paste the URL directly, which lets them share it anywhere, instead of only the sites for which you have a share button.
-
They’re enough.
Using 36 characters (a-z and 0-9):
2-character URLs give me 1296 (36²) unique combinations.
3-character URLs give me 46,656 (36³) unique combinations.
4-character URLs give me 1,679,616 (36⁴) unique combinations.
I don’t need more than that.
That doesn’t mean the shorter the better.
If I can remember “/plaintext
” easier than “/pt
”, then that’s a better choice.
How?
Here’s how I do it:
Save my HTML file as the URL name, with no extension.
Instead of “hi.html
”, I save it as “hi
” in my public web root.
default_type text/html;
That’s it! That serves my files without extensions as HTML.
If I ever switch to a different system or server, there is always a way to pull up your HTML using a short URL.