1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <meta http-equiv="X-UA-Compatible" content="IE-9"/>
5 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6 <title>YOURLS: Your Own URL Shortener</title>
7 <link href='https://fonts.googleapis.com/css?family=Fira+Sans:400,700' rel='stylesheet' type='text/css'>
8 <style type="text/css" media="screen">
11 font-family: Verdana, Arial, sans-serif;
33 margin: 10px 20px 0px 20px;
35 border: 1px solid #8d8d8d;
36 background-color: #f5f5f5;
44 a, a:active, a:link, a:visited {
46 text-decoration: none;
50 text-decoration: underline;
60 border:1px solid #2A85B3;
65 position:absolute; background: #E3F3FF; width:100%; height:230px; top:0px; left:0px; z-index:-1;
66 background: -webkit-gradient(linear, left top, left bottom, from(rgba(227, 243, 255, 1)), to(rgba(227, 243, 255, 0)));
67 background: -moz-linear-gradient(top, rgba(227, 243, 255, 1), rgba(227, 243, 255, 0.1)); /* for firefox 3.6+ */
70 @keyframes mymove { 0% {top:130px;} 50% {top:150px;} 100% {top:130px;} }
71 @-moz-keyframes mymove { 0% {top:130px;} 50% {top:135px;} 100% {top:130px;} }
72 @-webkit-keyframes mymove { 0% {top:130px;} 50% {top:140px;} 100% {top:130px;} }
73 @-o-keyframes mymove { 0% {top:130px;} 50% {top:135px;} 100% {top:130px;} }
75 width:80px; margin-top:10px; float:right; position:absolute; margin-left: 810px;
76 animation:mymove 0.5s ease 5s 7;
77 -moz-animation:mymove 0.5s ease 5s 7;
78 -webkit-animation:mymove 0.5s ease 5s 7;
79 -o-animation:mymove 0.5s ease 5s 7;
81 #fb,#g1,#tw{ float:left; margin:0 5px; width: 60px; height:63px; text-align: center; margin-bottom: 10px; padding:7px 2px; border:2px solid #2A85B3; background: #E3F3FF; border-radius:10px;}
82 #fb span {width:50px !important}
83 #fb .fb_iframe_widget iframe{position:relative}
84 /* Place Holder Style */
92 background: none repeat scroll 0 0 white;
93 border: 3px solid #2A85B3;
94 -moz-border-radius:20px;
95 -webkit-border-radius:20px;
99 padding: 5px 20px 10px;
107 font-family: 'Fira Sans', Verdana, Arial;
113 background:transparent url(https://yourls.org/images/yourls-logo.png) left 5px no-repeat;
119 h1 a:hover{text-decoration:none}
122 text-decoration:underline;
125 font-family: 'Fira Sans', Verdana, Arial;
131 h2.first{margin-top:10px}
137 font-family: 'Fira Sans', Verdana, Arial;
149 font-family: Verdana, Arial;
152 list-style-type: none;
153 padding-bottom: 28px;
154 border-bottom: 1px solid #2A85B3;
155 margin:0 30px 12px 30px;
161 background-color: #deedfb;
162 margin: 3px 0px 0px 5px;
163 border: 2px solid #2A85B3;
164 -webkit-border-top-left-radius: 10px;
165 -webkit-border-top-right-radius: 10px;
166 -moz-border-radius-topleft: 10px;
167 -moz-border-radius-topright: 10px;
168 border-top-left-radius: 10px;
169 border-top-right-radius: 10px;
175 text-decoration: none;
178 #Tabs li.Tab a:hover {
179 background-color: #bfe0fe;
180 -webkit-border-top-left-radius: 10px;
181 -webkit-border-top-right-radius: 10px;
182 -moz-border-radius-topleft: 10px;
183 -moz-border-radius-topright: 10px;
184 border-top-left-radius: 10px;
185 border-top-right-radius: 10px;
188 #Tabs li.SelectedTab {
191 background-color: #fff;
192 margin: 0px 0px 0px 5px;
193 border-top: 2px solid #2A85B3;
194 border-right: 2px solid #2A85B3;
195 border-left: 2px solid #2A85B3;
196 border-bottom: 6px solid #fff;
197 -webkit-border-top-left-radius: 10px;
198 -webkit-border-top-right-radius: 10px;
199 -moz-border-radius-topleft: 10px;
200 -moz-border-radius-topright: 10px;
201 border-top-left-radius: 10px;
202 border-top-right-radius: 10px;
204 #Tabs li.SelectedTab a {
208 text-decoration: none;
222 border:1px solid #2A85B3;
223 -webkit-border-radius: 10px;
224 -webkit-border-bottom-right-radius: 25px;
225 -webkit-border-bottom-left-radius: 25px;
226 -moz-border-radius: 10px;
227 -moz-border-radius-bottomright: 30px;
228 -moz-border-radius-bottomleft: 30px;
230 border-bottom-right-radius: 30px;
231 border-bottom-left-radius: 30px;
234 background:#fff url(https://yourls.org/images/favicon.gif) 2px center no-repeat;
238 <!--[if IE]> <style>#fade{display:none}</style> <![endif]-->
241 <div id="fb-root"></div>
245 <header role="banner">
246 <h1><a href="http://yourls.org/">YOURLS: <span>Y</span>our <span>O</span>wn <span>URL</span> <span>S</span>hortener</a></h1>
252 <li id="MoreTab" class="Tab"><a href="#More" onclick="toggle(this);">More</a></li>
253 <li id="FAQTab" class="Tab"><a href="#FAQ" onclick="toggle(this);">FAQ</a></li>
254 <li id="APITab" class="Tab"><a href="#API" onclick="toggle(this);">API</a></li>
255 <li id="PluginsTab" class="Tab"><a href="#Plugins" onclick="toggle(this);">YOURLS plugins</a></li>
256 <li id="ConfigTab" class="Tab"><a href="#Config" onclick="toggle(this);">Config</a></li>
257 <li id="InstallTab" class="Tab"><a href="#Install" onclick="toggle(this);">Install/Upgrade</a></li>
258 <li id="AboutTab" class="SelectedTab"><a href="#About" onclick="toggle(this);">About</a></li>
266 <div class="fb-like" data-href="http://yourls.org/" data-send="false" data-share="true" data-layout="box_count" data-width="60" data-show-faces="false" data-font="verdana"></div>
267 <script>(function(d, s, id) {
268 var js, fjs = d.getElementsByTagName(s)[0];
269 if (d.getElementById(id)) return;
270 js = d.createElement(s); js.id = id;
271 js.src = "https://connect.facebook.net/en_US/all.js#xfbml=1&appId=125474947598196";
272 fjs.parentNode.insertBefore(js, fjs);
273 }(document, 'script', 'facebook-jssdk'));</script>
276 <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://yourls.org" data-via="ozh" data-lang="en" data-related="YOURLS">Tweet</a>
277 <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
280 <script src="//platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script>
281 <script type="IN/Share" data-url="https://yourls.org/" data-counter="top"></script>
287 <h2 class='first'>About YOURLS</h2>
289 <h3 id="what">What is YOURLS</h3>
290 <p><strong>YOURLS</strong> stands for <strong>Your Own URL Shortener</strong>. It is a small set of PHP scripts that will allow you to run your own URL shortening service (<em>a la</em> TinyURL or bitly).</p>
292 <p>Running your own URL shortener is fun, geeky and useful: you own your data and don't depend on third party services. It's also a great way to add branding to your short URLs, instead of using the same public URL shortener everyone uses.</p>
294 <h3 id="features">YOURLS Features</h3>
296 <li><tt>Free</tt> and <tt>Open Source</tt> software.</li>
297 <li><tt>Private</tt> (your links only) or <tt>Public</tt> (everybody can create short links, fine for an intranet)</li>
298 <li>Sequential or custom URL keyword</li>
299 <li>Handy <tt>bookmarklets</tt> to easily shorten and share links</li>
300 <li>Awesome <tt>stats</tt>: historical click reports, referrers tracking, visitors geo-location</li>
301 <li>Neat <tt>Ajaxed</tt> interface</li>
302 <li>Terrific <tt>Plugin</tt> architecture to easily implement new features</li>
303 <li>Cool developer <tt>API</tt></li>
304 <li>Full <tt>jsonp</tt> support</li>
305 <li>Friendly <tt>installer</tt></li>
306 <li><tt>Sample files</tt> to create your own public interface and more</li>
309 <h3 id="screenshots">Screenshots</h3>
312 <p>Main admin dashboard</p>
313 <img src="https://yourls.org/yourls-org-images/admin-dashboard.gif" />
315 <p>Stats for each short URL</p>
316 <img src="https://yourls.org/yourls-org-images/stats-anim.gif" />
318 <p>See a live example of YOURLS stats on <a href="http://yourls.org/cookie+">http://yourls.org/cookie+</a></p>
321 <h2 id="download">Download</h2>
323 <p><a href="http://yourls.org/download">Download YOURLS</a> from Github</p>
324 <p>You can follow YOURLS' development on the <a href="http://yourls.org/revisions">commit history</a> and get <a href="https://github.com/YOURLS/YOURLS/archive/master.zip">current development build</a></p>
326 <h2 id="credits">Credits</h2>
328 <p>YOURLS is made by <a href="https://github.com/YOURLS/YOURLS/graphs/contributors">awesome people</a>.</p>
330 <p>Keep up to date: follow <a href="http://twitter.com/yourls">@yourls</a>, <a href="http://twitter.com/ozh">@ozh</a> (lead developer)and read the official <a href="http://blog.yourls.org/">YOURLS Blog</a></p>
333 <!-- Installation Instructions -->
334 <div id="InstallDiv" style="display: none;">
335 <h2 class='first' id="fresh">Fresh Install</h2>
337 <li>Unzip the YOURLS archive</li>
338 <li>Copy <code>user/config-sample.php</code> to <code>user/config.php</code></li>
339 <li>Open <code>user/config.php</code> with a raw text editor (like Notepad) and fill in the required settings</li>
340 <li>Upload the unzipped files to your domain <code>public_html</code> or <code>www</code> folder</li>
341 <li>Create a new database (see <a href="#Config" onclick="toggle(this);">Configuration</a> – you can also use an existing one)</li>
342 <li>Point your browser to <code>http://your-own-domain-here.com/admin/</code></li>
344 <h3 class='first' id="auto">Install Guides</h3>
345 <p>Here is a list of some (unofficial) install guides using automated tools:</p>
347 <li><a href="https://www.rosehosting.com/blog/how-to-install-yourls-on-ubuntu-14-04/">How to Install YOURLS on Ubuntu 14.04</a></li>
348 <li><a href="https://thishosting.rocks/how-to-shorten-your-links-with-your-own-domain/">How to Install YOURLS on a VPS or shared hosting</a></li>
349 <li><a href="https://www.websitehostingrating.com/how-to-install-yourls-using-softaculous/">How to Install YOURLS using Softaculous</a></li>
351 <h2 id="upgrade">Upgrade</h2>
353 <li><strong>Backup the database!</strong></li>
354 <li>Unzip the YOURLS archive</li>
355 <li>Upload files to your server, overwriting your existing install</li>
356 <li>Point your browser to <code>http://your-own-domain-here.com/admin/</code></li>
357 <li>Tip: you can now move your <code>config.php</code> file to the <code>/user</code> directory</li>
362 <!-- Configuration Instructions -->
363 <div id="ConfigDiv" style="display: none;">
364 <h2 class='first'>Configuration (in <code>user/config.php</code>)</h2>
365 <h3 id="mysql">MySQL settings</h3>
367 <li><code>YOURLS_DB_USER</code><br/>
368 your MySQL username<br/>
369 <em>Example:</em> <tt>define( 'YOURLS_DB_USER', 'joe' );</tt></li>
370 <li><code>YOURLS_DB_PASS</code><br/>
371 your MySQL password<br/>
372 <em>Example:</em> <tt>define( 'YOURLS_DB_PASS', 'MySeCreTPaSsW0rd' );</tt></li>
373 <li><code>YOURLS_DB_NAME</code>:
374 The database name<br/>
375 <em>Example:</em> <tt>define( 'YOURLS_DB_NAME', 'yourls' );</tt></li>
376 <li><code>YOURLS_DB_HOST</code><br/>
377 The database host<br/>
378 <em>Example:</em> <tt>define( 'YOURLS_DB_HOST', 'localhost' );</tt></li>
379 <li><code>YOURLS_DB_PREFIX</code><br/>
380 The name prefix for all the tables YOURLS will need<br/>
381 <em>Example:</em> <tt>define( 'YOURLS_DB_PREFIX', 'yourls_' );</tt></li>
384 <h3 id="site">Site options</h3>
386 <li><code>YOURLS_SITE</code><br/>
387 Your (hopefully short) domain URL, no trailing slash, lowercase. If you pick the non-www version of your domain, don't use the www version in your browser (and vice-versa)<br/>
388 <em>Example:</em> <tt>define( 'YOURLS_SITE', 'http://ozh.in' );</tt></li>
389 <li><code>YOURLS_HOURS_OFFSET</code><br/>
390 Timezone GMT offset<br/>
391 <em>Example:</em> <tt>define( 'YOURLS_HOURS_OFFSET', '-5' );</tt></li>
392 <li><code>YOURLS_PRIVATE</code><br/>
393 Private means the admin area will be protected with login/pass as defined below. See <a href="http://yourls.org/privatepublic">Private or Public</a> for more.<br/>
394 <em>Example:</em> <tt>define( 'YOURLS_PRIVATE', 'true' );</tt></li>
395 <li><code>YOURLS_UNIQUE_URLS</code><br/>
396 Allow multiple short URLs for a same long URL<br/>
397 Set to <tt>true</tt> to allow only one pair of shortURL/longURL (default YOURLS behavior), or to <tt>false</tt> to allow creation of multiple short URLs pointing to the same long URL (as bit.ly does)<br/>
398 <em>Example:</em> <tt>define( 'YOURLS_UNIQUE_URLS', 'true' );</tt></li>
399 <li><code>YOURLS_COOKIEKEY</code><br/>
400 A random secret hash used to encrypt cookies. You don't have to remember it, make it long and complicated. Hint: generate a unique one at <a href="http://yourls.org/cookie">http://yourls.org/cookie</a><br/>
401 <em>Example:</em> <tt>define( 'YOURLS_COOKIEKEY', 'qQ4KhL_pu|s@Zm7n#%:b^{A[vhm' );</tt></li>
402 <li><code>yourls_user_passwords</code><br/>
403 A list of username(s) and password(s) allowed to access the site if private<br/>
404 Passwords can either be in plain text, or encrypted: see <a href="http://yourls.org/userpassword">http://yourls.org/userpassword</a> for more information.<br/>
405 <em>Example:</em> <tt>'joe' => 'mypassword'</tt></li>
408 <h3 id="urlsettings">URL Shortening settings</h3>
410 <li><code>YOURLS_URL_CONVERT</code><br/>
411 URL shortening method: base <tt>36</tt> or <tt>62</tt>. See <a onclick="toggle(this);" href="#FAQ">FAQ</a> for more explanations</li>
412 <li><code>yourls_reserved_URL</code><br/>
413 A list of reserved keywords that won't be used as short URLs. Define here negative, unwanted or potentially misleading keywords<br/>
414 <em>Example:</em> <tt>'porn', 'faggot', 'sex', 'nigger', 'fuck', 'cunt', 'dick'</tt></li>
417 <h3 id="optional">Optional settings</h3>
419 <li><code>YOURLS_PRIVATE_INFOS</code><br/>
420 If <code>YOURLS_PRIVATE</code> is set to <tt>true</tt>, you can still make stat pages public. To do so, define with:<br/>
421 <tt>define('YOURLS_PRIVATE_INFOS', false);</tt>
423 <li><code>YOURLS_PRIVATE_API</code><br/>
424 If <code>YOURLS_PRIVATE</code> is set to <tt>true</tt>, you can still make your API public. To do so, define with:<br/>
425 <tt>define('YOURLS_PRIVATE_API', false);</tt>
426 <li><code>YOURLS_NOSTATS</code><br/>
427 If <code>YOURLS_NOSTATS</code> is set to <tt>true</tt>, redirects won't be logged and there will be not stats available.<br/>
431 <h3 id="advanced">Advanced settings</h3>
433 <li>YOURLS will look for the MySQL extension PDO, MySQLi or MySQL, in that order. If you want to force usage of one particular extension, add the following line to your <code>config.php</code>:<br/>
434 <tt>define( 'YOURLS_DB_DRIVER', 'mysqli' );</tt></li>
435 <li>You can install YOURLS behind a firewall or a proxy: see <a href="http://yourls.org/proxy">Proxy Support</a></li>
436 <li>File <code>includes/load-yourls.php</code> contains a few more undocumented but self explanatory and commented settings. Add them to your own <code>config.php</code> if you know what you're doing.</li>
440 <!-- YOURLS plugins -->
441 <div id="PluginsDiv" style="display:none">
442 <h2 class='first'>Plugins for YOURLS</h2>
444 <h3 id="plugins">Plugins?</h3>
445 <p>Plugins are additional PHP scripts that extend the functionalities or features of YOURLS. The core of YOURLS is designed to be as light as possible and avoid bloat (implementing functions not everybody needs) and to allow for easy customization.</p>
446 <p>Using the plugin architecture, you can add new features to YOURLS without having to modify core files. This way, your changes won't be lost when you upgrade your YOURLS installation and you can easily activate and deactivate a plugin from the admin interface.</p>
447 <p>There's a growing number of plugins available: check the <a href="http://yourls.org/pluginlist">Plugin list</a>.</p>
449 <h3 id="documentation">Documentation</h3>
450 <p>Several sample plugins are included in the archive. Read the source and learn the concept. It's easy and fun!</p>
451 <p>Check the <a href="http://yourls.org/pluginapi">plugin API documentation</a> to learn more</p>
456 <div id="APIDiv" style="display:none">
457 <h2 class='first'>YOURLS' API</h2>
459 <h3 id="apifeatures">Features</h3>
461 <li>Generate or get existing short URLs, with sequential or custom keyword</li>
462 <li>Get some statistics about your links: top clicked links, least clicked links, newest links</li>
463 <li>Output format: JSON, XML, or simple raw text</li>
464 <li>Authentify either with login/password or using a secure passwordless mechanism</li>
467 <h3 id="apiusage">Usage</h3>
468 <p>You need to send parameters to <code>http://your-own-domain-here.com/yourls-api.php</code> either via <code>GET</code> or <code>POST</code> (remember to <strong></strong>URL encode parameters</strong> if via GET). These parameters are:</p>
470 <li>A valid <code>username</code> / <code>password</code> pair, or your <code>signature</code> (see <a href="http://yourls.org/passwordlessapi">Passwordless API requests</a>)</li>
471 <li>The requested <code>action</code>: <tt>"shorturl"</tt> (get short URL for a link), <tt>"expand"</tt> (get long URL of a shorturl), <tt>"url-stats"</tt> (get stats about one short URL), <tt>"stats"</tt> (get stats about your links) or <tt>"db-stats"</tt> (get global link and click count)</li>
472 <li>With <tt>action = "shorturl"</tt> :
474 <li>the <code>url</code> to shorten</li>
475 <li>optional <code>keyword</code> and <code>title</code> for custom short URLs</li>
476 <li>output <code>format</code>: either <tt>"jsonp"</tt>, <tt>"json"</tt>, <tt>"xml"</tt> or <tt>"simple"</tt></li>
479 <li>With <tt>action = "expand"</tt> :
481 <li>the <code>shorturl</code> to expand (can be either 'abc' or 'http://site/abc')</li>
482 <li>output <code>format</code>: either <tt>"jsonp"</tt>, <tt>"json"</tt>, <tt>"xml"</tt> or <tt>"simple"</tt></li>
485 <li>With <tt>action = "url-stats"</tt> :
487 <li>the <code>shorturl</code> for which to get stats (can be either 'abc' or 'http://site/abc')</li>
488 <li>output <code>format</code>: either <tt>"jsonp"</tt>, <tt>"json"</tt> or <tt>"xml"</tt></li>
491 <li>With <tt>action = "stats"</tt> :
493 <li>the <code>filter</code>: either <tt>"top"</tt>, <tt>"bottom"</tt> , <tt>"rand"</tt> or <tt>"last"</tt></li>
494 <li>the <code>limit</code> (maximum number of links to return)</li>
495 <li>output <code>format</code>: either <tt>"jsonp"</tt>, <tt>"json"</tt> or <tt>"xml"</tt></li>
498 <li>With <tt>action = "db-stats"</tt> :
500 <li>output <code>format</code>: either <tt>"jsonp"</tt>, <tt>"json"</tt> or <tt>"xml"</tt></li>
505 <h3 id="apiexample">Sample requests</h3>
506 <p>Example of a <tt>GET</tt> request with Javascript (using jQuery) to shorten a URL</p>
507 <pre><tt>var api_url = 'http://sho.rt/yourls-api.php';
508 var response = $.get( api_url, {
509 username: "your_username",
510 password: "your_password",
513 url: "http://ozh.org/"
515 // callback function that will deal with the server response
517 // now do something with the data, for instance show new short URL:
518 alert(data.shorturl);
522 <p>Example of a <tt>POST</tt> request with PHP to expand a short URL</p>
524 $username = 'your_username';
525 $password = 'your_password';
526 $api_url = 'http://sho.rt/yourls-api.php';
528 // Init the CURL session
530 curl_setopt($ch, CURLOPT_URL, $api_url);
531 curl_setopt($ch, CURLOPT_HEADER, 0); // No header in the result
532 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Return, do not echo result
533 curl_setopt($ch, CURLOPT_POST, 1); // This is a POST request
534 curl_setopt($ch, CURLOPT_POSTFIELDS, array( // Data to POST
537 'action' => 'expand',
538 'username' => $username,
539 'password' => $password
542 // Fetch and return content
543 $data = curl_exec($ch);
546 // Do something with the result. Here, we echo the long URL
547 $data = json_decode( $data );
548 echo $data->longurl;</tt></pre>
550 <h3 id="apireturn">Sample returns</h3>
551 <p>Sample return in JSON format for the <code>shorturl</code> action</p>
555 "url": "http:\/\/ozh.org",
556 "title": "Ozh RICHARD \u00ab ozh.org",
557 "date": "2014-10-24 16:01:39",
561 "message": "http:\/\/ozh.org added to database",
562 "title": "Ozh RICHARD \u00ab ozh.org",
563 "shorturl": "http:\/\/sho.rt\/1f",
567 <p>Sample return in XML format for the <code>expand</code> action</p>
568 <pre><tt><result>
569 <keyword>ozh</keyword>
570 <shorturl>http://sho.rt/ozh</shorturl>
571 <longurl>http://ozh.org/</longurl>
572 <message>success</message>
573 <statusCode>200</statusCode>
574 </result></tt></pre>
576 <h3 id="apisample">Sample file</h3>
577 <p>There's a sample PHP file included that serves as an example on how to play with the API</p>
579 <h3 id="expand_api">Expand the API</h3>
580 <p>You can easily implement custom API actions with a plugin. See the <a href="http://yourls.org/pluginlist">plugin list</a> for examples.</p>
585 <!-- FAQ Instructions -->
586 <div id="FAQDiv" style="display: none;">
587 <h2 class='first'>FAQ</h2>
589 <h3 id="requirement">Server requirements</h3>
591 <li>A server with <strong>mod_rewrite</strong> enabled</li>
592 <li>At least <strong>PHP 5.3</strong></li>
593 <li>At least <strong>MYSQL 5</strong></li>
594 <li><em>Note</em>: YOURLS can also run on <a href="https://github.com/YOURLS/YOURLS/wiki/Nginx-configuration">Nginx</a> and <a href="https://github.com/lylebrown/YOURLS-Cherokee">Cherokee</a></li>
597 <h3 id="recommendation">Server recommendations</h3>
599 <li>PHP <a href="http://www.php.net/curl">CURL extension</a> installed if you plan on playing with the API</li>
602 <h3 id="limitations">Limitations</h3>
604 <li>Maximum length of custom keyword is <strong>200 characters</strong></li>
605 <li>That makes about <strong>8 sexdecillions of centillions</strong> of available URLs (<a href="http://en.wikipedia.org/wiki/Names_of_large_numbers">seriously</a>. That's a 355 digits number). </li>
608 <h3 id="base3662">Difference Between Base 36 And Base 62 Encoding</h3>
610 <li>Base 36 encoding uses <code>0123456789abcdefghijklmnopqrstuvwxyz</code> for short URLs</li>
611 <li>Base 62 encoding uses <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz</code></li>
612 <li>Stick to one setting, don't change after you've created links as it will change all your short URLs!</li>
613 <li>Base 36 is the default and should be picked if you're not sure.</li>
616 <h3 id="shortdomain">Getting a short domain name for your YOURLS install</h3>
618 <li>Unless you plan on making it public and as popular as bit.ly, any shared hosting will be fine. Ozh runs all his YOURLS instance on <a href="http://yourls.org/dreamhost">Dreamhost</a> and it works just great.</li>
619 <li><a href="http://domai.nr/">Domainr</a> is a fun search tool that might inspire and help you</li>
620 <li>Aim for exotic top level domains (.in, .im, .li ...), they're often cheap and a lot are still available. <a href="https://www.gandi.net/domain/buy/search/">Gandi</a> is a pretty comprehensive registrar, for instance.</li>
623 <h3 id="htaccess">YOURLS needs its own .htaccess</h3>
625 <li>You cannot install YOURLS and, say, WordPress, in the same directory. Both need to handle URLs differently and need their own <tt>.htaccess</tt> file.</li>
626 <li>If you want to install YOURLS on the same domain than your blog, give it its own (short) subdirectory, such as yourblog.com/s/ (for "short") or yourblog.com/x/ (for "exit")</li>
629 <h3 id="does404">If YOURLS generates 404 for your short URLs</h3>
631 <li>Make sure <strong>mod_rewrite</strong> is enabled with your Apache server</li>
632 <li>Make sure your .htaccess file looks like <a href="http://yourls.org/htaccess">this one</a></li>
633 <li>Eventually, check your server Apache configuration allows use of .htaccess (<tt>AllowOverride All</tt> directive, ask your server admin)</li>
636 <h3 id="sequential">Random versus sequential short URLs</h3>
638 <li>Out of the box, YOURLS generates sequential short URLS (ie <code>ab31</code>, then <code>ab32</code> and so on)</li>
639 <li>If you prefer random short URLs (ie <code>j3kz1</code> then <code>13hz7</code> like Bitly does), just activate the plugin that comes with YOURLS.</li>
642 <h3 id="stats">"Stats don't update as I think they should", "difference with Google Analytics", etc...</h3>
644 <li>Out of the box, YOURLS updates traffic stats every time a short URL is requested. Period.</li>
645 <li>This said, some clients (like indexing bots, your internet browser) may skip requesting a short URL if they have the final destination known in cache.</li>
646 <li>Conversely, other stat tools may use different techniques to track hits (using javascript or not, using IP adress, filtering multiple requests by same client, etc...)</li>
647 <li>Bottom line: your mileage may vary with different tools, but there is no bug in YOURLS regarding that matter.</li>
650 <h3 id="noindex">There is no index page at the root of the install</h3>
652 <li>Indeed. It's intended. It's up to the user to make what they need. Some will redirect the root to a different place, some make a public interface for anyone to shorten links, some make a portfolio. You make it.</li>
653 <li>If you want to make a public interface and run your own little bitly.com, there's a sample file provided as an example: <code>sample-public-front-page.txt</code>. This implies important issues to deal with: spam, performance and security. Read <a href="http://yourls.org/public">Public Shortening</a> for important information.</li>
656 <h3 id="lowercase">Uppercase letters in short URLs are eaten up, eg "<code>OmgOzh</code>" becomes "<code>mgzh</code>" !</h3>
658 <li>Indeed. It's intented if you selected Base 36 (see above). Letters that don't belong to the character set, eg <code>@#!</code> or <code>ABC</code>, are removed.</li>
659 <li>If you want to force lowercase, you'll need a <a href="http://yourls.org/pluginlist">plugin</a>.</li>
662 <h3 id="feedback">Feedback, feature requests and bug reporting</h3>
664 <li>Please don't get in touch directly by mail or Twitter. <a href="http://yourls.org/support">Please</a>.</li>
665 <li>Check the <a href="http://yourls.org/roadmap">Road Map</a> for future features.</li>
666 <li>Read all the <a href="http://yourls.org/wiki">wiki documents</a>.</li>
667 <li>Search in all the <a href="http://yourls.org/issues">issues</a>, open and closed.</li>
668 <li>Eventually raise a new issue. To do so, please read the <a href="http://yourls.org/contribute">contribute guidelines</a>. Thanks!</li>
675 <div id="MoreDiv" style="display: none;">
677 <h2 class='first'>Community</h2>
679 <p>YOURLS is open source, so the community of users plays a great role in its development, by contributing, helping others or giving feedback that helps improve the software.</p>
681 <h3 id="ressources">Resources</h3>
683 <li>The official <a href="http://blog.yourls.org">YOURLS blog</a>, for news, hints and showcase.</li>
684 <li>The <a href="http://yourls.org/wiki">wiki</a>: advanced documentation, plugins, tips and more</li>
685 <li>Follow <a href="https://twitter.com/YOURLS">@YOURLS</a> for hardcore development, and <a href="https://twitter.com/ozh">@Ozh</a> for tips and news (and random geekiness too)</li>
688 <h2 id="showcase">Showcase</h2>
690 <h3>Here are a few examples of sites running YOURLS with a unique design or concept</h3>
692 <li><a href="http://oe.cd/">http://oe.cd/</a><br/>
693 OECD's internal URL shortener with a neat interface and private features</li>
695 <li><a href="http://yourwish.es/">http://yourwish.es/</a><br/>
696 Easily share an Amazon wishlist</li>
698 <li><a href="http://vbly.us">http://vbly.us</a><br/>
699 Public YOURLS setup and early adopter, run by famous sex writer Violet Blue as "the internet's first and only sex-positive url shortener", once taken down by Libya (<a href="http://www.readwriteweb.com/archives/libya_shuts_down_vbly_bitly_owly_next.php">story</a>)</li>
702 <h2 id="frameworks">YOURLS and other platforms or frameworks</h2>
704 <li id="wordpress"><a href="http://wordpress.org/extend/plugins/search.php?q=yourls">WordPress</a><br/>
705 There are numerous WordPress plugin with YOURLS support. <a href="http://wordpress.org/extend/plugins/yourls-link-creator/">YOURLS Link Creator</a> is recommended.</li>
707 <li id="drupal"><a href="http://drupal.org/project/yourls">Drupal</a><br/>
708 Allows for the automatic creation of short urls using a YOURLS installation</li>
710 <li id="perl"><a href="http://github.com/pjain/WWW-Shorten-Yourls">Perl</a><br/>
711 WWW-Shorten-Yourls is a Perl module to shorten URLs using YOURLS</li>
713 <li id="ruby"><a href="https://github.com/threestage/yourls">Ruby</a><br/>
714 A Ruby wrapper for the YOURLS API</li>
716 <li id="python"><a href="http://tflink.github.com/python-yourls/">Python</a><br/>
717 A Python client for YOURLS</li>
719 <li id="vbnet"><a href="http://www.nugardt.com/open-source/yourls-api/">VB .Net</a><br/>
720 A VB .Net 4.0 wrapper for the YOURLS API</li>
722 <li id="javascript"><a href="http://neocotic.com/yourls-api/">Javascript</a><br/>
723 JavaScript bindings for the YOURLS API to leverage JSONP support</li>
725 <li id="cake"><a href="https://github.com/driflash/CakePHP-YOURLS-Plugin">CakePHP</a><br/>
726 Plugin which integrates CakePHP with Yourls</li>
728 <li id="statusnet"><a href="https://github.com/rthees/yourls-status-net">status.net</a><br/>
729 A plugin for status.net to use YOURLS</li>
731 <li id="sharetronix"><a href="http://developer.sharetronix.com/mpview/12/tag:yourls">Sharetronix</a><br/>
732 A YOURLS addon for Sharetronix</li>
736 <h2>YOURLS works with your favorite sofware or device</h2>
738 <li id="tweetie2"><a href="http://www.eugenegordin.com/etc/how-to-use-your-custom-yourls-shortener-with-tweetie-2.html">Tweetie 2</a><br/>
739 How to set up Tweetie2 so it uses your own service</li>
741 <li id="tweetbot"><a href="http://2fatdads.com/2012/02/how-to-make-yourls-org-work-in-tweetbot/">Tweetbot</a><br/>
742 Make Tweetbot run with YOURLS</li>
744 <li id="twitterfeed"><a href="http://blog.yourls.org/2011/09/how-to-use-twitterfeed-with-your-custom-yourls-url-shortener/">Twitterfeed</a><br/>
745 Use Twitterfeed with YOURLS</li>
747 <li id="mac"><a href="http://timi.im/app/">Mac Client</a><br/>
748 Simple app to have a global keyboard shortcut send a link to YOURLS</li>
750 <li id="android">Android: <a href="https://play.google.com/store/apps/details?id=de.mateware.ayourls">aYourls</a>, <a href="https://play.google.com/store/apps/details?id=com.mndroid.apps.urly">URLy</a> and <a href="https://play.google.com/store/apps/details?id=de.keineantwort.android.urlshortener">URL Shortener</a><br/>
751 Android apps that plays nice with YOURLS</li>
753 <li id="iphone">iOS: <a href="http://adamdehaven.com/blog/2015/05/shorttail-for-yourls-an-elegant-yourls-client-for-iphone/">ShortTail for YOURLS</a>, <a href="http://itunes.apple.com/us/app/clicklytics-track-clicks-on/id444008024?mt=8">Clicklytics</a> and <a href="https://itunes.apple.com/us/app/myyourls/id661934890?mt=8">myYOURLS</a><br/>
754 Apps to use YOURLS on iPhones and iPads</li>
756 <li id="chrome"><a href="https://github.com/ukoms/Chrourls">Chrourls</a><br/>
757 Google Chrome quick link shortening addon for YOURLS</li>
759 <li id="firefox"><a href="https://addons.mozilla.org/en-us/firefox/addon/yourls-shortener/">Firefox Addon</a><br/>
760 Firefox Addon for YOURLS</li>
762 <li id="textexpander"><a href="http://www.chrismarquardt.com/blog.php?id=7952283233607249761">Textexpander and YOURLS</a><br/>
763 Making YOURLS and Textexpander on the Mac play together</li>
766 <h2 id="morestuff">More stuff to do with YOURLS</h2>
769 <li><a href="https://github.com/tomslominski/infinity-squared">Infinity Squared</a><br/>
770 ∞² is a public page theme for YOURLS to help you design your own public interface</li>
772 <li><a href="https://github.com/Flynntes/Sleeky">Sleeky</a><br/>
773 Sleeky is another public page theme for YOURLS</li>
775 <li><a href="https://github.com/ScottHelme/yourls-index-page">Scott Helme's page</a><br/>
776 Example index page listing all the URLs held in a YOURLS database</li>
778 <li><a href="http://screenr.com/nTs">http://screenr.com/nTs</a><br/>
779 A screencast explaining how to setup YOURLS</li>
781 <li><a href="http://v007.me/836">YOURLS: Short URL Widget</a><br/>
782 Creates a fully configurable widget that outputs the short URL to the current post or page</li>
784 <li><a href="http://foolrulez.org/blog/2009/09/yourls-widget-released">YOURLS Widget for WordPress</a><br/>
785 This widget adds a convenient short URL service into your sidebar. Check the above link for a live example</li>
787 <li><a href="http://www.stewartallen.org/2010/08/yourls-twitter-tools-wordpress-plugin/">Twitter Tools & YOURLS</a><br/>
788 Companion plugin for Alex King's Twitter Tool for WordPress, that enables YOURLS support</li>
790 <li>YOURLS featured on <a href="http://lifehacker.com/5335216/make-your-own-url-shortening-service">Lifehacker</a></li>
793 <h2>"Celebrity endorsements", sort of.</h2>
796 <li><a href="http://epic.gm/">http://epic.gm/</a> by <a href="https://www.epicgames.com/">Epic Games</a></li>
798 <li><a href="http://mclrn.co/">http://mclrn.co/</a> by <a href="http://www.mclaren.com/">McLaren Cars</a></li>
800 <li><a href="http://smashed.by/">http://smashed.by/</a> by <a href="http://smashingmagazine.com/">Smashing Magazine</a></li>
802 <li><a href="http://oe.cd/">http://oe.cd/</a> by <a href="http://www.oecd.org/">the OECD</a></li>
804 <li><a href="http://cuny.is/">http://cuny.is/</a> by <a href="http://www.cuny.edu/">the City University of New York</a></li>
806 <li><a href="http://virg.in/">http://virg.in/</a> for the <a href="http://www.virgin.com/">Virgin Group companies</a></li>
808 <li><a href="http://dhurl.org/">http://dhurl.org/</a> by <a href="http://yourls.org/dreamhost">Dreamhost</a></li>
810 <li><a href="https://rho.st/">https://rho.st/</a> by <a href="https://www.rosehosting.com/">RoseHosting.com</a></li>
816 </div> <!-- content -->
818 </div> <!-- container -->
820 <div id="fade"></div>
822 <script type="text/javascript">
824 // Dynamically get tabs
826 var d = document.getElementById('Tabs');
827 var matches = d.innerHTML.match(/<li.* id="(.+?)Tab"/g);
830 tabs[i]= matches[i].replace(/<li.* id="/,'').replace('Tab"', '');
832 tabs = tabs.reverse();
836 // window.location.hash
838 // Toggle tab display
839 function toggle(el) {
840 var hashes = el.toString().replace(/^.*?#/, '').split('#');
841 var target = hashes[0];
842 var anchor = hashes[1];
843 // If tab doesn't exist, exit
844 if( tabs.indexOf( target ) == -1 )
846 for (var tab in tabs) {
848 document.getElementById(tabs[tab]+'Tab').className = 'Tab';
850 document.getElementById(tabs[tab]+'Div').style.display= 'none';
852 // highlight & display target
853 document.getElementById(target+'Div').style.display = 'block';
854 document.getElementById(target+'Tab').className = 'SelectedTab';
856 try { el.blur(); } catch(err) {}
857 // Try scrolling to anchor
859 window.scroll(0,findPos(document.getElementById(anchor)));
860 } catch(err) { window.location.hash = target; }
863 var tabs = getTabs();
864 // On page load/refresh display required tab
866 toggle(location.hash);
868 // Background fancyness
870 var rndbg = [ 'bg_ants.png', 'bg_circles.png', 'bg_cross.png', 'bg_diag.png', 'bg_fuzzy.png', 'bg_fuzzy_bits.png', 'bg_yourls.png', 'bg_fuzzy_bits.png', 'bg_life.png', 'bg_boobs.png' ];
871 var bg = rndbg[ Math.floor( Math.random() * rndbg.length ) ];
872 document.body.style.background='#E3F3FF url(user/plugins/random-bg/img/'+bg+')';
875 //Finds y value of given object
876 function findPos(obj) {
878 if (obj.offsetParent) {
880 curtop += obj.offsetTop;
881 } while (obj = obj.offsetParent);
882 curtop = curtop - 30;