short.af

> a simple url shortener

short.af/
?

about short.af

short.af is a simple url shortener that was initially inspired by short.af (2016). i wanted to make my urls short as f*&k, so after years of living with long-ass links, i finally bought this domain name and made something with it.

the source is available on github, you're welcome to contribute changes, or get help with self-hosting.

all urls are checked against google's safe browsing api before shortening in order to protect users against malware & phishing sites. if you wish to disable this, you can host your own instance of this software and leave the api key blank in the configuration.

about me

my name is gabe dunn and i'm a fullstack software developer. you can find more information about me and my projects at either my homepage or my github page.

api reference

GET /:shortcut

visting /:shortcut will result in a 302 redirect to the destination url if a shortcut exists, and a 404 otherwise

GET /expand/:shortcut

visting /expand/:shortcut will return the destination url in plain text if a shortcut exists, and 404 if it doesn't exist

POST /shorten

the /shorten endpoint takes two parameters: {from, to}. omitting from will allow the server to generate a random shortcut for the url. this will return the shortcut object with a 201 status if sucessful, a 403 if the url is flagged as malicious, 422 if the shortcut already exists, and 400 for any other errors.