Short URLs: why and how
2022-05-08If you make your own website, consider making short URLs.
Note: This is not about a URL shortener. This is about making your original URLs short in the first place.
Why?
Short URLs matter for a few reasons:
- You can remember them. You can avoid the search engine step. No need to search when you already know the answer. Which means…
- You can tell someone. You can even say it out loud! Whether 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 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, 26 letters (a-z) and 10 numbers (0-9): 2-letter URLs give you 1296 (36²) unique combinations. 3-letter URLs give you 46,656 (36³) unique combinations. 4-letter URLs give you 1,679,616 (36⁴) unique combinations. You don’t need more than that. Long URLs are overkill.
How?
Here’s how I do it: Save your HTML file with no extension. Instead of “hi.html
”, just save it as “hi
” in your public web root.
That’s it! That will serve any file without an extension as HTML.
If you ever switch to a different system or server, there is always a way to pull up your HTML using a short URL.from Hacker News https://sive.rs/su
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.