mmm / 5ea749e
add why_redirectly blog post s-ol 18 days ago
4 changed file(s) with 54 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1 # Why I'm running a personal URL shortening service
2 This blog you are reading at the moment is currently running it's third reincarnation.
3 Originally, it was a Jekyll blog hosted on github pages,
4 before I moved to my own web platform.
5 That platform is currently undergoing its second big rewrite.
7 Even while still running on github pages,
8 the blog moved from, to and finally to
9 Once arrived at, I had to move the blog posts to a different route (`/blog` vs just living in the root)
10 at some point, to make space for other routes.
11 Then with my custom platform everything changed again,
12 since now my main system is actually located at
14 As you might imagine, at every change all the old URLs stop working.
15 Noone likes finding dead links, but if you post links on social media
16 it is often extremely unwieldy or impossible to update all the posts.
18 If you run your own website or blog ([maybe][sir] you [should][indie]?),
19 your site may have gone throug similar transitions,
20 or maybe it is about to go through one -
21 or perhaps you are deferring making a change because you worry about this?
23 To partially solve this issue, I built a tiny URL redirection service, [redirectly][redirectly].
24 It works much the same as those URL shortening services you may have used before (, tinyurl etc.),
25 except that I manually specify the shortened URLs in a file (in the git repo).
27 Nowadays, when I post a link to some content on my website (such as this blog post),
28 I first allocate a new `slug` (shortlink) and set it up in `redirectly`.
29 Then I use the shortened link, such as in this case,
30 instead of directly linking to the content.
32 This way, whenever I make changes to my content's adressing scheme,
33 I simply change the URL location, and any old links that are floating around remain functional.
34 Should I ever change to another domain, I will consider simply leaving the redirection service running on this domain anyhow,
35 to keep old links alive. At least for a few years :)
37 Of course all of this doesn't work when visitors of my page navigate around by themselves,
38 and then share the URL from their address bar.
39 This could be solved by using the JS [history API][history] by overriding the displayed URL with the permalink whenever one exists,
40 but I haven't tried implementing this type of bi-directional querying yet.
42 I am also aware that running Clojure (and therefore a JVM) is not necessarily
43 the best choice for a service that is so light,
44 but I wrote `redirectly` as a little experiment while learning Clojure,
45 and it is such a simple project that if it ever bugs me I can just throw it out and implement it in something else.
47 [sir]:
48 [indie]:
50 [redirectly]:
51 [history]:
1 Why I'm running a personal URL shortening service