YOURLS stands for Your Own URL Shortener. It’s a self-hosted, open source URL shortener, like bit.ly, except you manage and own the thing and the data. It’s:

  • Great for branding
  • Great for being independant and in control
  • Nice for ego
  • Simply fun if you’re a geek

YOURLS is maintained by Ozh, findable mostly on his blog planetOzh and on Twitter.

Learn more about YOURLS on the main site.

Note: this page is NOT meant to file support requests.

Short URL to this post: http://yourls.org/4

61 thoughts on “About

  1. Hi,

    Just started using Yourls…have a query about the reports that I am getting? I can account for the referral traffic however the direct traffic source is not clear…can you help?

  2. Direct is when there’s no referrer data (loaded from bookmarks, from a mobile device, or from a client with no referrer)

  3. Hi there

    Im trying to switch to the yourls script but im having a difficulty and ive been messing with it for hours and finally decided to ask for help:)

    Where at in the script does it do the final step in redirecting, I want to add a “http://anonym.to/?” to the beginning of it. Ive tried adding code all over the script and have gotten mixed results with the api, so instead of trying to add it to the actual short links i just want to place the call at the final step and anonym the link.

    Any help please?


  4. What’s “(we have hacked this title)” appearing in my title. I’m perfectly happy to honor TOS, but I recall the terms of service were ‘Do whatever the hell you want with it!’ No? Do I need a fresh install to purge this message. Please tell me this is a built-in function and not more vandalism.

  5. Hi! Thanks for an awesomely awesome php app – YourLS 1.5 has been working flawlessly for me since Feb 2011! I very much appreciate the ability to host my own shortener/redirector and track clicks without relying on a 3rd party or giving them all my info. So big thanks again for making YourLS available!

    Couple questions though:
    1) Say I have a shortened URL that points to a download, and then a few days later I Edit the yourls URL in the admin system and make it point to a new download. My users still end up getting the old download instead of the new one unless I tell them to clear their browser cache and try again. Is there any way to get the redirector to force a refresh and not be cached by their browser so the Edited link will point to the new file without clearing their browser cache?

    2) Is there any compelling reason to upgrade from 1.5 since all is working well, and I’m hesitant to break my database and hundred of links we are using?

    Thanks! :)

    • 1) share your link with a randomish query string, such as http://sho.rt/blah?v2, http://sho.rt/blah?v3, etc… everytime you change the link target. Using a plugin to send “302 redirect” headers instead of the default 301 would help, too.

      2) See the changelog. Nothing will break, there is no DB structure change. You should *always* update (and you should should always backup regularly and before an update)

  6. Hi! Thank you very much for your project, which I’m finding pretty fascinating.
    I guess I’ve been lucky enough to become one of the first guys in Russia to see your yourls.org project. However, I have a little problem. I have tested YOURLS 1.5.1 Released and the result was great, although it did take a bit of effort for me to add Cyrillic. However, I cannot dig much information myself due to the language barrier, that’s why I’m asking you for help. How can I limit URL by IP address? Can I do that at all? To be exact, what I want to do is restrict the number of URLs created by new users, so that, for instance, only 3 URLs per day from a particular IP are allowed.
    If that is not too much trouble for you, please, help me!
    Thank you!

  7. First of all I want to said thank you for making this awesome script I been looking for something like this for a while. Now I got a question I want to make the short URL a ramdon latter and number url for ex:www.domain.com/Gtd3 and not http://www.domain.com/1 not increase number. It is possible??

  8. Hi Ozh,

    I’ve made little hack for Yourls for Antispam in the frontend.
    Here It is…
    In index.php, just before “submit” button add:

    You are Bot or Human ?

    in /includes/functions.php after the <?php in the top, add:

    if ( isset($_POST['check']) && $_POST['check'] != user ) { exit('Antispam check Failed !'); }
    That's It !
    I hope this will helps. Spread please this little Antispam hack in Yourls.org website.

    Kind Regards,
    Tihomir Hristov

    • Thanks. 2 comments :
      – you’re doing it wrong. Modifying core files is *always* a bad idea, there’s a plugin API to add features without modifying core files
      – there’s absolutely no difficulty for spammers to automate an extra field in the POST request

      • True, but they’d have to find your site,examine the underlying form code, and then write fresh exploit code to do the job. I’ve found it much more satisfying to simply change the spam entries to point to my own marketing sites (any sites that aren’t my own are spam). Then, the spammers work for me, hurrying to spread MY links everywhere, thinking they are their own.

        • That’s hilariously delightful :) Are those links actually spread? Did you check? I suspect most spammers just add links for the sake of doing it and hoping that you will spread them, but they’re not using it.

  9. Heads up — the YOURLS site no longer works with IE11 on Win7; tabs don’t work; likely some change in CSS/Java; works fine with Chrome. But, threw me the other day when I went back to look at plugins post update. Trying to sort out why I get whole bunch of “array” data on the stat referrer screen in our install; likely due to a weird character from a site with tracking … but was looking at plugins. Love the product. Thanks! :-)

  10. One way to remove spam links when you use the same YOURLS database in several domain names is to run a cron job against the MySql database (I run it every two minutes) that deletes entries coming from IP addresses that are not allowed by you. Here is the crontable entry (the command can also be run manually from phpMyAdmin):

    */2 * * * * /usr/bin/mysql -hlocalhost -u -p -e “DELETE FROM yourls_url WHERE ip NOT in (”, ”, ”, ”);”

    Replace text between with your own values.


    • That’s horribly overkill. You’d be much much better with a plugin that whitelists your IP addresses instead.

      • Thanks for the suggestion. I tired that but it was high maintenance as I use the same DB instance for 9 different domain names using separate YoURLs frontends. So running one cron job instead of updating the pluggin in nine places was easier. Cheers!

  11. Hello Webmaster,
    I am webmaster of Supercoder.com and we are doing link clean up for our site. We analyzed and found your site is having bad search reputation. Hence we request you to remove our link on below given pages.

    (Add links from site as given in sheet if specific link is not available than given only domain name, Be careful email without mentioning domain name will not be of any use.)

    Please note if you did not remove the links we will submit your site to disavow tools which will give search engine a negative signal about your site and your site will get further penalty.

    Please let me know once link is removed or you have any query

  12. I have installed private YOURLS a couple of times using Softalicious and it can’t be accessed until I change the permissions. I did a mass update to set all files to 755, but not sure that is the best way. Any hints?

    • Sorry, I don’t know Softalicious. It’s not recommended to chmod everything 755 anyway. You would be better chmoding dirs 755 and files 644, except config.php chmoded 400 or 440 depending your host. Test and see if that works.

      Also: please don’t use this page for support requests. If you want to add up to your comment, open an issue on Github and give as much details as you can.

  13. Hello, I want to use your API to track Conversions on these urls. Can you guide me How to do this? or you have any service to impliment this for me?

  14. Hello, I want to use your API to track Conversions on these urls. Can you guide me How to do this? or you have any service to impliment this for me?

    Thanks in advance

  15. Hello

    Can you please update the yourls application in parallels plesk because they still have the old Yourls v1.5 version

    Thank you

  16. is it possible to force a separate page to open every time someone clicks on the link ?

  17. Hi. I wanted to post this to your blog about translating the YOURLS. But the comments are closed in there. The POT file you have provided cannot be recognized in POEDIT. So, I guess you have to fix it. Thanks.

    • Provided where? Did you get it on github? There have been numerous translations done since we last modified that file, so I think any problem is on your side.

  18. Thanks for YOURLS, been trying to do from scratch but its too much work. Been using it on my site with minor changes to the front page at ldn.pw and fdh.pw

  19. Hi – I have just installed Yourls 1.7.1, and everuthing is working great in Chrome and Firefox. But when I try to click a shortened URL in IE11, I get a runtime error saying – Server Error in ‘/’ Application.
    How do I get this to work in IE11??

  20. Hi
    Nice code ! Can you give me any tips on customising the user url shortening page. Basically i want just a form with no css or formatting so I can build on it. Tried to find where the css and formatting is – but cant – many thanks

  21. Thanks for great Application!

    Just wanted to know if there is a better way to import / export bulk URLs from CSV. We tried the plugins available but the problem is they export every URL. I would want to export only those URLs which have a particular date or tag or campaignID. I would have loved to write a plugin but I dont know PHP :(

  22. Hi,
    I have installed Multi-user plugin. Everything is working well except the stats. I can only open the stats, if I am login as admin in the browser. I need your help. Thanks.

  23. Hi,
    Thank you for the great tool.
    I have a question regarding the traffic stats that come with it.
    We implemented a tracking code into our web pages to get an overview of the website performance. The numbers I get here are much lower than those in the tool. For example: a page for which we used yourls got 52 visits (according to the standard tracking) but the yourls stats say that there had been 1.536 clicks. That’s quite a difference. Do you have any idea where this comes from or is there any additional information to your stats?

  24. How much time will a redirect url created with yourls be good for?
    Will a redirect created still be good, 6 months from now even if it’s not clicked on?

    Thank you

  25. Hi,
    I am using phurl and I would like to use your nice tools. Is there an easy way to import data from phurl data base into my new yourls installation ?

    Thanks !

  26. Can YOURLS be used to redirect to an eMail address in your default eMail client?
    We are interested in list a short link that can be updated to the correct eMail address should it ever need updating.

  27. Is there a way to remove bot traffic from existing data? I know there’s plugin to not logging new bot traffic but i need to clean up legacy data.

  28. Just want to say thank you for YOURLS! I’m using it for my YouTube channel to shorten URLs in the video description. Works perfect :)

  29. Hello, dunno where to write this question, so I try here. How to setup yourls to work in a subdirectory, but with its own domain. Like In my hosting where BRUT.me is the index page in root directory i created a subdirectory with yourls to which I want to use a completely another domain (fetuj.sk).

    best regards Brut

  30. Really excited to install and use this software, but I can’t find in the wiki or FAQ the key question I want the answer to – when I have created a shortened URL, I can edit later to which long URL it points to can’t I??

  31. Very useful app, using it for a while.
    However Ia m not sure how does it track hits? We have a short url which shows nearly 20k hits yourl app but less than 5k pageviews in Google Analytics. I expect some drop off but it seems huge.
    Any pointers?

  32. I have come across a bug where a short url consists of a hyphen as the last character. When this short url is sent within a text message to an iPhone, the short url works fine. When the short url is sent within a text message to an Android device, the hyphen is displayed, but is excluded from the link. Is there a way to tell Yourls to exclude hyphens from short urls?

  33. Hello,

    Trying to find a plugin to use to allow individuals to check their own stats not sure if there is a plugin for this or just a way to set it up in the script itself. If a plugin is needed please advise or if there is a way to do it directly in the script can anyone explain how to set this up.

    Thanks in advance.


  34. Looking at making YOURLS scalable. Any tips on how to make that happen?

    If I use a seperate DB and have multiple YOURLS instances accessing the same DB, will that work?

  35. Hi.
    I originally had a simple url shortener “brevi” with the TL DN “.tk”. (free!)
    When I decided to switch it to .ca I opted for yourls, which is a bit more complicated than mine.
    Just one question: How can I delete a string of urls? Occasionally some spammer will use the YOURLS to set up a whole list of urls, obvoiusly all pointing to the same site. I just noticed I have a Russian one now with 30+ entries, and I would like to delete them all in one shot. Could I list the whole table in phpmyadmin? which field would I use?

    • See plugins. Any time you have a question about YOURLS, start with the wiki, everything you have to know or want to know is there.

  36. It’s a shame you don’t have a donate button! I’d certainly donate to this superb blog! I suppose for now i’ll settle for bookmarking and adding your RSS feed to my Google account. I look forward to brand new updates and will share this website with my Facebook group. Talk soon!

  37. Hi Buddy just installed YOURLS yesterday however I am facing a strange issue. whenever I try to activate a plugin in manage plugin section it shows the message “Plugin has been activated” however the plugins is not getting activated. I tried reinstalling YOURLS but no success so far. I am using Yourls on a shared hosting.
    Installed it through Softaculous.
    Hope you would help.

Comments are closed.