Make Easy, Memorable URLs for Your Users

With nearly every resource a business uses these days being served through a browser, every application is now a URL.  If you find yourself in IT, some portion of your job may be just managing the growing list of URL resources.  What makes this even more challenging is when your applications are hosted by cloud providers using their own domains for serving your applications.  To add even more and more complexity, some of these cloud providers have you access your application with lots of URI parameters (http://FQDN/Path/to/cgi?parameter1=value&parameter2=value,etc…).

Most in IT want to make their systems use short, memorable URLs to promote usage of their applications.  To resolve the issue, instead, most companies have an intranet page that they use as a springboard to all of these URLs.  But if each system could be accessed through a simple, short, memorable URL, it would make them so much easier to get to.  This article discusses a couple easy methods for shortening URLs and how to Make Easy, Memorable URLs for your friends, employees, and the internet in general!

yourlsYOURLS (Your Own URL Shortener)

I recently had the opportunity to install a YOURLS instance for a friend.  He needed a single, simple location to manage all of his URLS in one place.  YOURLS works off of a single domain but allows you to make as many directory redirects as you want.  For example, Let’s imagine that I have outsource my human resource system to a human resources cloud system provider such as infinisource or Bamboohr and I want employees to be able to get to the system using:  http://uptimemadeeasy.com/hr.  With YOURLS, you simply add the URL and then tell it the Custom short URL name that you want it to use.

Screen Shot 2014-03-28 at 2.00.36 PM

 

 

With this in place, my employees will be able to access our cloud hosted HR system using the newly created http://uptimemadeeasy.com/hr URL.

YOURLS-URLListingYOURLS allows you to add all of the URLS that you want to shorten, allowing you to manage all of your links in one simple location.

YOURLS-Usage-StatisticsAdditionally, YOURLS keeps track of all of the URL links, and generates statistical reports on their usage that can be helpful to you to determine how they are being used.

Once you have your URL links configured in YOURLS, you can use the “Share” feature to share your links on Facebook and Twitter.

If you are interested in more information on YOURLS or in downloading it and installing it, visit the YOURLS webpage.

Use Apache for Domain Redirects

While YOURLS helps you work out your link shortening by using directories after your domain name, by using Apache redirects, you can use subdomains in your URL links instead.

The difference between using a subdirectory versus a subdomain is shown below:

Directory URL Link:  http://www.uptimemadeeasy.com/hr
Subdomain URL Link:  http://hr.uptimemadeeasy.com

Here is how we can extend our hr link example to using a subdomain.  We basically have 2 tasks to get this working.  First, we need to add a CNAME DNS record to send our subdomain to an Apache webserver and second, we need an Apache webserver.  Once again, we are trying to get people to this URL: http://hr.uptimemadeeasy.com ->  https://www.myhrcloudprovider.com/UserLogin.aspx?id=uptime.

Step 1 – Create a CNAME DNS Record for Your Subdomain

I am planning to use the Apache server on my www.uptimemadeeasy.com website to handle the Apache redirect, so I need to add a CNAME DNS record in my DNS pointing to my www.uptimemadeeasy.com subdomain.

Create-CNAME-DNS-Record

Create a CNAME DNS Record Using PowerAdmin

Step 2 – Add Redirect to Your Apache Config Files

Now that the hr.uptimemadeeasy.com traffic is being sent to my www Apache, I need to tell Apache what to do with the traffic.  We will turn on the RewriteEngine and then use a RewriteCond and RewriteRule:

        RewriteEngine On

        RewriteCond %{HTTP_HOST} ^hr\.uptimemadeeasy\.com$ [NC]
        RewriteRule ^(.*)$ https://www.myhrcloudprovider.com/UserLogin.aspx?id=uptime [R=301,L]

And with a quick Apache restart:

     service httpd restart

We are done.  By browsing to http://hr.uptimemadeeasy.com we will arrive at our hr system.

The following two tabs change content below.
Jeff has 20 years of professional IT experience, having done nearly everything in his roles of IT consultant, Systems Integrator, Systems Engineer, CNOC Engineer, Systems Administrator, Network Systems Administrator, and IT Director. If there is one thing he knows for sure, it is that there is always a simple answer to every IT problem and that downtime begins with complexity. Seasoned IT professional by day, Jeff hopes to help other IT professionals by blogging about his experiences at night on his blog: http://uptimemadeeasy.com. You can find Jeff on or LinkedIn at: LinkedIn or Twitter at: Twitter

Latest posts by Jeff Staten (see all)

3 comments for “Make Easy, Memorable URLs for Your Users

  1. May 21, 2014 at 12:15 am

    Great info! Remember Webpac?

  2. May 21, 2014 at 8:52 am

    Do I ever! Amazing how web products have improved from those old c-based cgi days.

  3. September 27, 2017 at 11:16 pm

    Very good write-up. I definitely love this website. Keep it up!

Leave a Reply

Your email address will not be published. Required fields are marked *