OK, this falls into the category of “pet peeve” for me, but it’s important because it impacts your website and/or business.
I see so many people sharing URLs that are much longer and more complex than they need to be. Even worse, I frequently see people sharing completely broken URLs.
To be clear, by “share”, I mean publish or pass along in any way. The ramifications of overly complex URLs are minimal in social media, but when you print something on a business card, advertisement, or anywhere you expect people to remember and type it, the shorter, the cleaner, the better.
I have some rules I want to share with you on how to accomplish that.
To do this right, we need to deconstruct just what a URL is, and know which parts are optional, which are important, and in what situations.
Warning: URLs can get complicated.
I can hear you saying it: “Great. So what’s a URL?”
URL is an acronym for Uniform Resource Locator. That probably doesn’t help much either, so look at it as a:
- Standard (Uniform) way to
- Find (Locate)
- Something (a Resource)
on the internet.
“Something” can be a web page, a file to download, a video to watch – actually anything you might find on the internet.
Let’s break down this example URL of an image used in an Ask Leo! article:
“https” is what’s called the protocol – the language, if you will, your computer uses to talk to the server on the internet that has what we’re trying to retrieve.
There are several common protocols. You’re probably used to seeing https and http (“hypertext transfer protocol”, with and without “secure”), but there are others, including ftp (“file transfer protocol”), sftp (“secure file transfer protocol”), ftps (“file transfer protocol, secure” – and yes, it’s different than the preceding), ssh (“secure shell”), and many more.
Most often you’ll deal with http and https.
The “://” is nothing more than a separator. It’s those three characters, rather than something simpler, because of the way the URL syntax has evolved over time.1
“askleo.com” is the domain. This indicates the specific server – an actual computer – out on the internet with which this conversation will take place. The domain has multiple parts.
This example doesn’t have it, but whenever you see something in front of what you recognize as the domain, that’s a sub-domain. For example, in “biz.askleo.com”, that “biz” is a subdomain. That leads to a completely different site, which could be on a completely different server, than plain old askleo.com.
“www” is a somewhat special subdomain, in that it is typically treated as being exactly the same as not being there at all. Thus, “www.askleo.com” and “askleo.com” are the same site.
“.com” is what’s called the “top level domain”, often abbreviated TLD. When you purchase your domain, you’re actually registering it with whichever organization manages registrations for the TLD you choose, be it “.com”, “.info”, “.co.uk”, or something else. Some, like “.gov” or “.edu”, have restrictions on who is allowed to use them.
“wp-content/uploads/2014/05” is the folder – actually folders within folders – that contains the file we’re looking for. These are folders very much like the folders you have on your PC into which you place your files.
The folder is optional. When not specified, the “root”, or top-level folder of the site, is assumed.
“its-a-good-idea-to-test-backups-300×158.jpg” is the name of the file the URL refers to. In this case, it happens to be a jpg image. The file might be a “.htm” or “.html” file, which contains a web page, a “.php” file, which is a program that runs on the server to create a web page, a “.png”, a different type of image, or any of many other file types.
The file is actually optional. When not present, “index.html” is typically assumed.2
To explore parameters, we need a slightly different example URL. This is a link to an article taken from a recent Ask Leo! Newsletter:
You’ll note a question mark in the middle of the URL. Everything after the question mark is information passed along to the web page that’s about to be displayed. Information is typically provided in name=value format, with multiple information pairs separated with the ampersand. In this example, there are two:
Those pairs are tracking information used by my newsletter’s email provider. They allow me to see which links people find most interesting by tracking how many people click on them.
Parameters can be used for a wide variety of things besides tracking. For instance, there’s a parameter to pass along a name to be displayed within a web page.
Everything I’ve said so far could be wrong
That is how URLs are constructed, but…
Web servers are powerful computers, and they can be configured to interpret, change, hide, and obscure URLs in many different ways.
For example, consider this URL:
That looks like it references a file called “ms” on the domain “go.askleo.com”. Or perhaps it means a file called “index.html” in a folder called “ms”.
Actually, it’s neither. In reality, my server is configured to modify that URL before it’s processed. It’s altered to be:
Now you can see a specific page (redir.php) is referenced, along with a parameter being passed (t=ms), which redirects you to the microsoft.com web site. This is my URL shortener, or “redirector”, as I call it.
I point this out for two reasons:
- Not all URLs follow the rules I’ve laid out here, for a variety of reasons.
- Many of those reasons are designed to make it easier to deal with URLs. For example, “go.askleo.com/ms” is much easier to remember and/or type than “https://go.askleo.com/redir.php?t=ms” …
… which takes us to the next topic of discussion.
Linking to your website
You want things to be as easy as possible for your reader, customer, client, or fan.
That means you want things to be easy to use, easy to remember, easy to type, and easy to understand, regardless of whether you’re presenting the URL on a web page, in an email, or printed on a business card or flyer.
As you might guess, not all those scenarios call for the same solution.
On my business cards, I simply write:
Technically, that isn’t even a completely valid URL, since there’s no protocol! Yet if people remember and type only that into their web browser’s address bar (or even most search engines), they’ll get to exactly the right place. The browser assumes the “http://” part, and I have my web site configured to correct the “http” into “https” automatically.
Rule #1: when speaking or printing, the “http://” is unnecessary, irrelevant, and a waste of time and space. Don’t bother.
Rule #1a: when speaking or printing, 99.99% of the time, the “www.” is also unnecessary, irrelevant, and a waste of time and space. Don’t bother.
Telling people “askleo.com”, or “biz.askleo.com”, or “askleoonbusiness.com” is enough.
In my email signature, I often include:
I include the full, correct, URL because most email programs recognize this as a URL and automatically make it clickable. My recipient need do nothing more than point and click.
Rule #2: always include the full URL in email, unless you’re editing using HTML or rich text features.
Readable and clickable
If you’re using rich text or HTML email, or you’re working on a web page, you can have it both ways. For example, consider the following:
That’s a traditional clickable link. What’s called the “display text” or “anchor text” is simply “askleo.com”, but the target URL that it goes to when clicked is the full https://askleo.com. That way, people see the part that’s important and hopefully memorable, without needing to see the messy overhead that makes it clickable.
Exactly how you set this up depends on what tool you’re using to create your rich text or HTML. In raw HTML, it looks like this:
The display text doesn’t actually have to be the domain – I could just have Ask Leo! as the text shown, and still have that go to https://askleo.com. This is actually how almost all links on web pages are created.
Rule #3: When you have HTML or rich text editing capabilities, combine rules #1 and #2 to make links both readable and clickable.
Sharing or linking to a page
There are a couple of additional considerations when we come across (or create) a link to a page that we want to share somewhere, be it on our own websites, email, or social media.
Remember, the goal here is to make it as easy as possible on your target audience, taking into account whatever it is they’ll be using to view the link you share.
Parameters, yes or no?
Using our example with parameters:
Rule #4: Tracking parameters are always optional.
The question, of course, is “How do I know it’s a tracking parameter?”
There are two answers:
- You don’t.
- With experience.
Try the URL without the parameters and see if it takes you where you expect to go. If it does, the shorter URL, without the parameters, will most likely suffice.
If the link doesn’t work, or doesn’t take you to where you expect to go, then the parameters are probably required.
I’m reluctant to say this, because it will result in unnecessarily long and ugly URLs in many cases, but …
Rule #5: when in doubt, include the parameters – but give it a try without.
When to use a URL shortener
URL shorteners are tools like goo.gl or tinyurl.com that allow you to create a short URL that redirects to a longer one. For example, goo.gl/rn69jn will redirect you to that full example URL with tracking information included. It’s much shorter and easier to both say and (possibly) remember.
As a bonus, URL shorteners often provide statistics about how many times they’ve been used (clicked), and allow you to change the destination after the short URL has been created.
That last item is one of the reasons I make heavy use of my own URL shortener – go.askleo.com – on Ask Leo!. Over the years URLs change and break, but I can go into my shortener’s database and update the destination in one place, without having to visit all the different places I might have mentioned the URL. For example, if Microsoft’s home page ever changed from microsoft.com, I could simply change what my go.askleo.com/ms target is to the new location, and all references, including this one, would magically be updated.
More commonly, URL shorteners are used when the URL you want to share is so long that it would be broken by automatic word wrapping in email.
Rule #6: Use a URL shortener when a URL is excessively long, when you want to track how many people click on it, or if you want to plan ahead for that URL possibly changing some day in the future.
Bringing it all together
Most people can remain blissfully unaware of how URLs work, and what kinds of links to put where. For the most part, the internet just works for them, albeit messy at times.
You, on the other hand, are trying to engage an audience and add value to the world. It helps if you can make your audience’s interactions a little clearer and a little easier.
Rule #7: make your audience’s life easier whenever you can, by using and combining rules 1 through 6 whenever possible.
1: There’s actual meaning to the separator, but unless you end up doing fairly advanced command line things, mostly in Linux, you’ll likely never encounter them.
2: It’s actually somewhat more complex than that. The server typically runs through a list of “index” possibilities and returns the first one it finds.