A big url can look messy and confusing, but if you know what symbols to look for, you'll be reading them like sentences. Use these helpful color coded examples to dissect, decipher, and shorten long URLs.
Let’s start with a simple example, a YouTube URL. Use the color coding to help coordinate with the explanations.
The head bone’s connected to the neck bone.
Path to file –
Query string –
This is where a URL can start looking complicated, but it actually isn’t. We have here a collection of name/value pairs. It’s merely a way to pass specific information to this page. The names and values can be anything at all, vary from site to site and even page to page within a site. Think of it as the browser asking (or querying) “What about the details?” and the Internet responds with a long string of characters.
So we look for patterns. In the query string you’ll notice a question mark (
?) at the beginning and the regular occurrence of ampersands (
&) and equal signs (
=) within. Let’s split it up with that in mind.
The spinal vertebrae’s connected to the … other spinal vertebrae.
? – Start
Says “hey, from here on is a query string”
Since every site can make their own names and values, figuring out what they do is often a guessing game. But often it’s not too difficult. In this example,
v is for video, and the value is the video’s unique identifying code;
list is for playlist, and the value is the unique identifying code for the playlist, which tells the page to show the rest of the playlist;
index is where this video is in the playlist, in this case, the fifth. Name/value pairs are separated by the ampersand symbol (
Now you’re ready for surgical operation
Use your newfound knowledge of the query string to chop up URLs and see what happens! I like to shorten URLs before sharing them. Here are a few examples I’ve used in the past: