Here is a simple PHP script for creating your own URL shortening website. It supports multiple domains meaning you could point and at the same hosted location and define different URI's to redirect to for each domain.

Download the php files (2.43KB, .zip file)



  1. Ensure the domain name points at the hosting correctly.

  2. Add this index file and the .htaccess file into the root directory for the URL you want to shorten from.

  3. Import the shortens.sql file using phpMyAdmin or similar

  4. Add a line to the database table created for each shortened URL. e.g:
    s_name: test, s_note: some redirect, s_base_from_url:, s+base_from_url: /some/text, s_to_url



This script has been created by us and is completely open source and free to use under the MIT open-source licence.