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 communityI 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?
This could be done by adding a "search engine" even though it isn't strictly a search engine.
Enter 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 foo
, foo
, http://bar.com/
and select Done then entering foo in the omnibar will take you to http://bar.com
.
Settings
You could simply edit your hosts
file and add a host definition like so:
1.2.3.4 foo
Where 1.2.3.4
is the IP of bar.com
and 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 http://1.2.3.4
.
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 hosts
file:
/etc/hosts
%SystemRoot%\system32\drivers\etc\hosts
For other OSs, see the list here.
Solution
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/"