News for hackers. Stuff that matters.
Re:Show HN: I created a URL shortener that can be entirely h... by nelsontky on Monday November 16, 2020 @08:00AM (#25111072)
I was always fixated with URL shorteners and always wanted to write one myself. While it would be easy to write one that works with a server, I loved the idea of hosting and running one for free.

Thus, I wrote this URL shortener which does not need a backend to work at all. It uses GitHub issues as a "database", and unlike most other URL shorteners that do not need backends, this one doesn't need a # prefixed to the alias. (i.e. short URLs look clean like this: nlsn.cf/1 instead of looking like this: nlsn.cf/#1)

I haven't had the time to work on it more but do let me know what you guys think! Thank you and hope yall enjoy it!

Re:Show HN: I created a URL shortener that can be entirely h... by rsync on Monday November 16, 2020 @12:26PM (#25114368)
"I was always fixated with URL shorteners and always wanted to write one myself. While it would be easy to write one that works with a server, I loved the idea of hosting and running one for free."

I felt exactly the same way and did, in fact, build one.[1]

It was pretty simple. There's an interesting twist to the particular one I built - it's not specifically a URL shortener, it's a "Universal Shortener".[2] Also no tracking or cookies or third party connections, which I find pleasing.

The disappointing part is seeing the malicious spam and phishing URLs that get shortened. We have had to manually flag-hold-approve a lot of strings and IIRC we outright block anything with 'paypal' in it.

We also gave a kill-function to our upstream ISP so that they could immediately act on phishing complaints without our having to be involved in real-time.

[1] https://0x.co

[2] https://0x.co/hnfaq.html

Re:Show HN: I created a URL shortener that can be entirely h... by LeoPanthera on Monday November 16, 2020 @09:56PM (#25119830)
My biggest problem with this is the domain name. If you say "oh by", a vanishingly small amount of people will translate this to "0x". And you can't say "oh ex dot co", because the URL has both a 0 and a O in it - which will also always be ambiguous when written down. So you have to say something like "zero ex dot co", which I suppose is fine, but it has a lot of extra syllables.
Re:Show HN: I created a URL shortener that can be entirely h... by ValentineC on Monday November 16, 2020 @01:13PM (#25115002)
Since we're on HN, and this isn't addressed in either FAQ: did anyone end up paying for custom codes?
Re:Show HN: I created a URL shortener that can be entirely h... by rsync on Monday November 16, 2020 @02:32PM (#25115962)
Yes! People do, in fact, buy codes.

I've spent almost zero time on "Oh By" in the last 24 months as things at rsync.net have been very busy. So, we haven't made a sale in months due to lack of publicizing it.

However, I think there are unknown, emergent use-cases out there for "Oh By" that I hope people will discover. I am going to pivot back to "Oh By" next year ...

Re:Show HN: I created a URL shortener that can be entirely h... by nelsontky on Monday November 16, 2020 @12:36PM (#25114508)
Oh that is cool! It does remind me of https://telegra.ph/ by Telegram! (Even though they weren't really advertising it as a universal shortener). Just a quick question, how did you promote your platform!
Re:Show HN: I created a URL shortener that can be entirely h... by rsync on Monday November 16, 2020 @02:33PM (#25115977)
I've done almost nothing to promote it. I just mention it once in a while (like now) when the topic of shorteners comes up.

I also sent a notice to all rsync.net customers, years ago, when we launched it.

That's it.

Re:Show HN: I created a URL shortener that can be entirely h... by bryogenic on Monday November 16, 2020 @04:50PM (#25117423)
What does the "searchable" option mean? I couldn't find anything about it in the faqs.
Re:Show HN: I created a URL shortener that can be entirely h... by rsync on Tuesday November 17, 2020 @02:48AM (#25121165)
We're going to make an index page with links on it that cascade down to every code that is published and marked "searchable".

Then google can just find that index page and index every link on it - and all codes marked searchable will be indexed by google.

Re:Show HN: I created a URL shortener that can be entirely h... by voltagex_ on Monday November 16, 2020 @05:48PM (#25118080)
Blocked under the phishing category by my corporate proxy, FYI.
Re:Show HN: I created a URL shortener that can be entirely h... by diggan on Monday November 16, 2020 @08:04AM (#25111106)
Looks nice and simple! Bit strange to claim "there is no database" and then add "GitHub issues is the database", maybe add "there is no traditional RDMS/document database needed" or something similar.

You might want to detect infinite loops as well :) https://nlsn.cf/6

Last note, the status code seems to be incorrectly set to 404 instead of any of the redirection status code. If you're hosting it on GitHub pages, I'm not sure you can actually control it. If the status code was correctly set + the Location header, I think all browsers would be able to detect the infinite loop automatically and prevent it.

Re:Show HN: I created a URL shortener that can be entirely h... by nelsontky on Monday November 16, 2020 @08:13AM (#25111201)
HAHA so that was you. That was a good one! Yes and that title is definitely slightly misleading I kinda didn't want it to get so long and wanted that slight clickbait effect.

Yep I actually cannot control the status code at all. Part of what made this a fun and hacky project was the fact that I was actually redirecting to the actual URLs by catching the 404s. So, the only way i could think of catching the infinite loop was to supply the domain. That being said, I do appreciate the feedback and it's always great to learn more!

Re:Show HN: I created a URL shortener that can be entirely h... by diggan on Monday November 16, 2020 @08:16AM (#25111232)
Indeed :)

I think you could catch the infinitive loop client-side as well by comparing what the URL to redirect to is, and comparing it with the current URL. If they are the same, prevent the redirect. Although you would still be able to create loops by using two issues instead. Maybe just comparing the full hostname? If it's nlsn.cf, don't redirect.

Re:Show HN: I created a URL shortener that can be entirely h... by a1369209993 on Monday November 16, 2020 @08:34PM (#25119379)
> Maybe just comparing the full hostname? If it's nlsn.cf, don't redirect.

Doesn't work; eg, make http://someothershorten.er/foo -> http://nlsn.cf/1234 -> http://someothershorten.er/foo.

Re:Show HN: I created a URL shortener that can be entirely h... by alexvoda on Monday November 16, 2020 @08:46AM (#25111522)
How about making it turing complete?
Re:Show HN: I created a URL shortener that can be entirely h... by quyleanh on Monday November 16, 2020 @08:08AM (#25111153)
If you use it personally and you know what you are doing, I think this idea is good. For example I have my own domain and when I share long link to friends, I can use it.

By the way, your feedback is good for author improves. Thank you.

Re:Show HN: I created a URL shortener that can be entirely h... by woutr_be on Monday November 16, 2020 @08:04AM (#25111112)
That’s clever! I once did the same, except I used a static site generator that I would push to Github and deploy on Netlify.
Re:Show HN: I created a URL shortener that can be entirely h... by iamacyborg on Monday November 16, 2020 @08:32AM (#25111390)
Yeah I suspect you could do something nifty along these lines with Netlify Functions.
Re:Show HN: I created a URL shortener that can be entirely h... by woutr_be on Monday November 16, 2020 @10:16AM (#25112673)
I didn’t even use Netlify functions, it was all just HTML and a few lines of JavaScript.
Re:Show HN: I created a URL shortener that can be entirely h... by robbiemitchell on Monday November 16, 2020 @08:10AM (#25111166)
I’d love to know more about how you did this!
Re:Show HN: I created a URL shortener that can be entirely h... by davchana on Thursday November 19, 2020 @01:09AM (#25146713)
I too did exactly same, as linjed here in this thread itself:

https://news.ycombinator.com/item?id=25113154

Re:Show HN: I created a URL shortener that can be entirely h... by woutr_be on Monday November 16, 2020 @10:16AM (#25112666)
It’s really simple; I used Jekyll, every URL was a post with a simple template that did the redirection.
Re:Show HN: I created a URL shortener that can be entirely h... by bdorn on Monday November 16, 2020 @10:48AM (#25113090)
> does not need a backend

GitHub issues infrastructure is a backend!