Mobile app version of vmapp.org
Login or Join
Dunderdale272

: I want to run a URL shortener for my own usage, what do I need to do? I am tired of using external URL shorteners, my favorite "tr.im" went out of business. I know there are some that

@Dunderdale272

Posted in: #CleanUrls #Url #UrlShorteners

I am tired of using external URL shorteners, my favorite "tr.im" went out of business. I know there are some that will do reporting for me, but I want to run my own, so I can see the usage myself, for my own, not for public use.

Are there software packages that serve this niche? I don't necessarily want to allow third parties to use it, but I would like it to integrate into other software, like some Twitter tools or WordPress, if that's a possibility rather than always having to go to the site to log in.

What are my options for tools for running my own shortener? Assume I've done the easy part, buying a short domain.

And any other comments or tips on what makes a good shortener are welcome, but optional.

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Dunderdale272

4 Comments

Sorted by latest first Latest Oldest Best

 

@Samaraweera270

One more thing to think about is something like bit.ly Pro. You can have your own domain, but with all the speed and analytics from bit.ly.

I know that it's still relying on someone else's service, but bit.ly is probably the biggest provider on the web so if they went down, a hell of a lot of people's links would break

10% popularity Vote Up Vote Down


 

@Phylliss660

You can try out YOURLS. It is PHP-based and use MySQL so it should work on whatever host you're using. The nice thing is that it's GPL licensed. It looks great and the stats are very helpful.

10% popularity Vote Up Vote Down


 

@Carla537

Just adding this for your consideration. I use this package and like it a lot > yourls.org/
Cheerio.

10% popularity Vote Up Vote Down


 

@RJPawlick198

Setting up a URL shortener isn't really that hard if it is for your use only. In order to integrate with with Twitter and WordPress you will have to develop you own API and plugins and that is the difficult or at least time consuming part. I think the basic steps would be.


Buy a short URL and get hosting for it.
Create a redirection engine in the language of your choice. This would be a piece of code that takes a long URL and creates a short one by generating a 4-6 digit code. Since it is for your own use it could be as simple as creating a table that has the long URL and PK that is an identity column. You can then use the ID column as your short URL. Meaning if your first entry is example.com and your short url is ex.amp then ex.amp/1 would redirect to example.com. Build an API using REST or SOAP that allows you to securely add a new entry and retrieve the generated Short URL.
Code the tools for Twitter, Wordpress etc.


A side note, is somewhere in step 2 you would need to create your analytics code to track all the information about who hit your links.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme