It shortens an <a href="https://" rel="nofollow">https://</a> link to <a href="http://" rel="nofollow">http://</a>, and it also shortens invalid links.<p>Trying to add a js alert I noticed the preview allows arbitrary html to display, but the end result was useless - <a href="http://xiv.in/ZW4NL" rel="nofollow">http://xiv.in/ZW4NL</a> and trying different schemes caused http to be prepended to the url by default.<p>I would suggest trying to validate the urls, and at least attempting to connect and get a response once before hashing them. This will at least result in less junk in your database (or wherever you're storing them) if you dump invalid links altogether.
Why would I use this? (Not saying I wouldn't, just want to know why you built it and why I should use it instead of an existing service.)<p>The benefit of Bitly is that users recognize the link. It doesn't make them feel like they're about to get a virus.<p>Furthermore, Bitly has lots of nice features and actively fights malicious links. So the truth is, users actually <i>can</i> trust Bitly links a bit more than a service that just started up.