I want to create custom URL shortcuts in Chrome, such that hitting 'foo' in the omni/address bar will be the equivalent of hitting 'http://bar.com'.
How can I do this?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
This could be done by adding a "search engine" even though it isn't strictly a search engine.
chrome://settings/searchEngines to view the current settings. If you scroll down to the bottom of the pane there are 3 inputs for adding a search engine name, keyword and URL. If you add
http://bar.com/ and select Done then entering foo in the omnibar will take you to
You could simply edit your
hosts file and add a host definition like so:
18.104.22.168 is the IP of
foo is the shortcut you want to call it.Save the file, open any browser and type
foo in the address bar, that should take you to
This should work for all OSs, at least for Linux, Windows and OSX (or any Unix). The only thing that changes is the location of the
For other OSs, see the list here.
The Quickmarks extension does something very close to this.
I created a chrome extension for doing exactly this.
It allows you to define a URL shortcut and when you search for that shortcut it will navigate to the website you have saved.
Download the extension here.
Here is a nick name I created using the example you gave.
"foo" -> "https://www.bar.com/"