How can I create a URL shortcut in Chrome?
I'm not sure if this is possible, but I want to type in foo
, hit enter, and be directed to bar.com
.
You can achieve that by taking advantage of the Custom search engines feature in Google Chrome to create simple URL shortcuts. Even though it should be used to create shortcuts for custom search engines, you can use it to create shortcuts to any URL.
Right-click the address bar in Google Chrome and click
Edit search engines...
(or typechrome://settings/searchEngines
in the address bar).In the
Other search engines
table, scroll down, and click theAdd a new search engine
empty box.- In the
Add a new search engine
box, type the name of the shortcut (i.ebar
). - In the
Keyword
box, type the shortcut keyword (i.efoo
). - In the
URL with %s in place of query
box, type the URL of the website (i.ehttp://bar.com
).
- In the
Then, if you type the keyword foo
in the address bar, a suggestion named bar
will pop up, and by clicking Enter, you will be redirected to http://bar.com
.
We were somewhat inspired by this post and built something like this in eesel
You can make "Commands" for any app which are like a shortcut to a URL. Think /github issue new <labels> <title>
or /github pull request new
and so on.
We took things a step further and let you configure and inject JavaScript on the page that's opened, so you can build more advanced workflows. Think /google calendar join next
which goes to your calendar, clicks on your current event and joins it.
We covered it in a quick video here.
You can use Requestly chrome+firefox extension to setup URL shortcuts.
Follow these steps:
- Install Requestly.
- Create a new Redirect Rule.
-
Define Source & Destination as
Request Url -> Contains -> https://www.google.com/search?q=foo& Destination -> https://bar.com
Here is a screenshot setting up the rule:
You can also use Regex to redirect only on certain type of value that matches the regex. This answer written by founder of Requestly explains how you can use regex to redirect based on Regex Matches.