Have you ever tried to copy the links that are listed in your Google search results? I bet most of us don’t do it. We usually navigate to the page and if we find it interesting then we either copy the URL or just bookmark it.
But, if there is a need where in you just have to just copy the URLs from the Google search results then you would be surprised to see the link you get. When you mouse hover on the search results you can see the direct website URL but when you right click on the link and click Copy the link address you won’t get a direct URL.
For example, when I search for articpost on Google and copy the articpost website listed on the search result I get the below link:
But all you need is just http://www.articpost.com/ so how to make the links in the search results easier to copy? We can follow any of the below methods to turn off Google search results indirection.
Add the Don’t track me Google Chrome extension that will turn off Google search results indirection. Just add this to your Chrome browser and all your Google search results should now have the direct URL.
Use Developer Tools
- Go to www.google.com
- Launch developer tools in Chrome, Firefox or Internet Explorer. F12 is the common shortcut key to launch developer tools in all the three browsers.
- Go to the Console tab, copy and paste the below code in the script execution space and press enter.
- Now search for your query in Google and try to copy the link address. You should now get the actual URL.
If you are wondering from where I got the above rwt function, right click on the Google page and click View Page Source (in Internet Explorer it’s just View Source).Now search for rwt and you should see the function. This is the function that the Google page uses to redirect you to the website.
If you look into the below URL closely you can see that there is a URL in the link (we call it query string)
- Open Developer Tools in your browser.
- Copy the lengthy URL from Google search results and assign it to a variable as shown below:
- Now we need to find &url and extract its value, so we will make use of match function,
Note: The string inside the match function is called regular expression which is used to identify a pattern in any given string.
- The above script will give you “http%3A%2F%2Fwww.articpost.com%2F” as output.
- Now to replace the escape sequences in the above URL use the below script,
- Or you can simply combine the match and unescape into a single query as shown below,
Got a better way of doing this? Share it with us.