How to use shorten GitHub URLs and create vanity URLs

on November 10, 2017 at 01:12 am

Suppose you want to shorten the URL to a particular location on GitHub, (the service for shorting URLs only works with Github URLs, so you cannot use it to external sites). Or perhaps you want to create a vanity URL that goes directly to your GitHub profile, e.g. You can use GitHub URL Shortener.

To shorten a URL, open your command prompt (via Git Shell) and type in

$ curl -i -F "url=" -F "code=19cah"


-F "code=vanity"

For example 19cah, that is my Github username, but you can use whatever you want. Then you will recive in the response your shorten URL!


To create a vanity URL to your profile or URL you need to add # at the end of your profile or the url,

$ curl -i -F "url=" -F "code=19cah"

Now you’ll recive in the respose


And that’s all

Check some of the shorteners that I own redirecting to my profile:

You can use it to shorten your repositories, so it will be easy to share.

GitHub followers