How to Redirect YOURLS Root URL

YOURLS lets you easily create your own URL shortening service, a la bit.ly. By default, the YOURLS domain root takes you to a login page to access the administration backend. Here’s how to redirect it somewhere else.

  1. FTP into the YOURLS installation folder.
  2. Create a file and name it index.php if it doesn’t already exist.
  3. Copy and paste the code below into index.php.
  • <?php
    header(‘Location:http://yoururl.com/');
    ?>
  1. Change the URL as needed.
  2. Make sure to save the file.

That’s it! I used this method to redirect brli.co to BrianLi.com.

Like what you read? Give Brian Li a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.