Cleaning up URL's to Share and Protect Privacy

Our site remains ad-free thanks to our affiliates. This post's featured affiliate is Robinhood. Robinhood has commission-free investing, and tools to help shape your financial future. Sign up and get your first stock free.

The post is not sponsored by the above affiliate and the content here is not representative of their company.

Cleaning up URL’s to send to friends, tweet about, or share on various networking sites is a great idea. Below I will show you how to clean up some popular website URL’s. Before that though why should you clean up your URL’s? Well they can contain information you don’t want to share with other people. For instance Amazon keeps search terms saved in the URL when you visit product pages.

Example

http://www.amazon.com/Geek-This/dp/0000000000/ref=AAAAA?ie=UTF8&**keywords=search+term**

As you can clearly see the last URL parameter is your search terms. This could potentially be something you don’t want to share with others when linking people to products.

In the above URL you will need to grab the ASIN product number. In this case it is 0000000000. It can also be found on the product page under the “Product Details” section.

http://amazon.com/dp/0000000000

This will go directly to the product page. If you are part of the Amazon Associates Program, you can append “?tag=geekthis-20” at the end of the URL, but of course using your own associates tag so you get the income.

To shorten a link to a category, we start out with the full URL of a category we navigated to using our browser.

http://www.amazon.com/books-used-books-textbooks/b/ref=topnav_storetab_b?ie=UTF8&node=283155

We will see the node parameter. We copy and paste this so the new URL looks like the following. You may have to change the ampersand to a question mark if it isn’t already.

http://www.amazon.com/b/?node=283155

After you do a search on Google, the URL will look something similar to this.

https://www.google.com/#hl=en&q=i+love+google&oq=i+love+google&gs.......68ae7b8&biw=1354&bih=784

All of that is junk if you are linking someone to this search. You need to find the query you performed, in this case it is “I love google”, and it is found right after &q=

The new URL for Google search results will be as follows.

https://www.google.com/search?q=i+love+google

Or if you are linking to a person that has Google Instant you can shorten it even more

https://www.google.com/#q=i+love+google

And then it is even possible to remove the forward slash before the pound sign if you are on a desktop computer or laptop. Mobile browsers sometimes have issues with this type of URL.

But that’s not the shortest yet, Google has a shorter domain, so all the above URLs can use googl.com instead of google.com

Shorter YouTube URL’s

To shorten a YouTube search URL we find the term we want to search for, in this case “I love youtube”. If we don’t shorten the URL we are left with this.

http://www.youtube.com/results?search_query=i+love+youtube&oq=i+love+yotu.....817.7j3.10.h5FUcyfdw6k

If we do shorten it we get this.

http://www.youtube.com/results?q=i+love+youtube

You drop everything after the ?search_query value, and change that parameter name to ?q.

To shorten the video URL, you have a few options, the easiest and shortest is to go to the “Share” tab on YouTube and copy that URL. It looks similar to http://youtu.be/bLhmL-xY5Rw

If you don’t see a “Share” button for some reason, or want to manually type our the URL starting from the video page you are on you need to get the ?v= value from the URL.

http://www.youtube.com/watch?v=bLhmL-xY5Rw

Then just append that value to http://youtu.be/ and you have your shortened URL.

For shorter Profile URL’s you just have to remove /user/ from the URL, and all other parameters besides the username.

Before: http://www.youtube.com/user/geekthisnet

After: http://www.youtube.com/geekthisnet

Those are a few ways to shorten URL’s. This can be done with almost every website. You just need to find out which parameters in the URL are required, and then delete everything else.

Related Posts

Nginx Logging Privacy and Security

Learn how to stop Nginx from loggin IP address, sensitive URLs, authorization URLs, and query strings to help protect your users privacy and their security.

Bypass Google Analytics Opt-Out Extension

Easily bypass Google Analytics Opt-Out browser extension with a few lines of JavaScript and start tracking all users again.

Disable Google Analytics from Tracking You

Learn how to disable, block, and opt-out of Google Analytics to stop sending information about the sites you visit to Google.

PHP Calculate Time for Hashing Algorithms

How to calculate the time required for various hashing algorithms inside of PHP.