Hacker News new | past | comments | ask | show | jobs | submit login

That's why you have your own link shorteners. There is no reason to use some third party shortener that may or may not be alive the next year.



I actually use a third party, because I'm not a dev and have no idea on how to do one myself.


It's actually very easy to implement if all you want is just shortening and you have the slightest idea about databases. All you need to do is generate a random string (functions that do this for almost any language are available online), save that string and the long URL to the database.

If you want tracking and statistics though, it gets more complicated. The simple version can be a good way to get into web development now that I think about it. You learn about forms, GET/POST, databases, very basic SQL etc.


thanks a lot for elaborating it :)

how it works with the domain tho? i need to buy a short domain that will concatenate with my database strings, is that correct?


If all you need to do is to "hide" the parameters, you can just use a subdomain of your choice regardless of the length, like post.domain.com or a.domain.com. However, if you want an actual "shortened" url, you will need a short domain name. Shorteners use TLDs other than .com to make it even shorter. For example, reddit.com uses redd.it for short urls.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: