How to remove http:// adding in addressbar of google-chrome/firefox?
Solution 1
Where is the answer? The suggestion with Home button doesn't work anymore.
While reading all not working answers (I don't need host? for what? if people copy url, they need full url..:), I made my own solution. Just click to address bar, then hold "Ctrl+Shift", then click "Right" and "Left", Voila. Then you can "Ctrl"+"C"...
Solution 2
Bit of a hack as well, however I simply click in the toolbar, press the Home key, press Space, then press Shift+End and Ctrl+C.
So basically, just add a space to the start. Most commands don't even care if you keep the space in the parameters.
Solution 3
If you want Firefox to permanently show http
in the adress bar:
- go to
about:config
- search for the option
browser.urlbar.trimURLs
- set it to
false
I don't use Chrome, but there is this question: Make chrome put http:// in the browser
Solution 4
I use the following javascript snippet in Google Chrome to get the hostname and copy it to clipboard. I just tested it in Google Chrome.
You can create a bookmark int the Bookmarks Bar, name it GetHostname
and paste the following javascript code into the "URL" part of the bookmark:
javascript:(function(){
function executeCopy(text) {
var input = document.createElement('textarea');
document.body.appendChild(input);
input.value = text;
input.select();
document.execCommand('Copy');
input.remove();
}
executeCopy(window.location.hostname);
})();
Solution 5
This is pretty awful that chrome needs it, but you can use this addon to copy the host by clicking a button: http://chrisiona.com/post/122938597943/hostcopy-google-chrome-extension
Related videos on Youtube
zb'
Updated on September 18, 2022Comments
-
zb' almost 2 years
Chrome add the http:// when I copy address from addressbar, i often paste the address to console, to ping or ssh, it is possible to copy only hostname from addressbar ? How to switch off that feature in chrome and also in firefox ? I also like solution that will allow to unhide http:// in addressbar, so i can select domain without it.
-
zb' over 11 yearsI using the same trick, but it ugly, i just found myself today in terrible user environment, so got several questions that i collected last 2-3 years :)
-
NickSoft about 11 years@eicto: Make a list of links to these questions and open a google chrome issue/feature request: support.google.com/chrome/bin/answer.py?hl=en&answer=95315
-
NickSoft about 11 yearsI would kill for that feature in google chrome...
-
James Manning almost 11 years@NickSoft - FWIW, people have been complaining since this was checked in (well over 3 years ago) to no avail, so I'm not sure 1 more will make a difference. It's an interest read, though: code.google.com/p/chromium/issues/detail?id=41467
-
NickSoft almost 11 yearsYes, I know. However most people do not take actions. One more is not a big deal, but many more is. I guess google measure in %. If most of the people do not complain, then they are ok with it. I guess most people think that they won't make a difference and that's why they don't complain.
-
Meetai.com about 10 yearslol this should be added surely
-
TristanK almost 9 yearsI like this simple fix.
-
Underverse over 8 yearsI wonder how many people have coded a workaround to the problems caused by the chrome dev team removing the protocol from the url bar and putting in the crappy insert-http-when-copying code. They must have absolutely no knowledge of automated testing if they thought this was a good idea.
-
TecBrat about 8 yearsThat's the workaround I use. Looking for a fix like the FireFox flag "browser.urlbar.trimURLs;false" but apparently Google knows better us what we should want in a browser.
-
TecBrat about 8 yearsAnother thing crossed my mind last night, and I tried it this morning. Just click the address (omni) bar hold CTRL tap "XV" (or "AXV" if it does not fully highlight.) and the full URL will appear in the address bar so you can copy whatever you need out of it.
-
user428517 over 7 years@Underverse probably lots. But then again, Google has legendarily bad UX design, so it shouldn't be surprising.
-
EM0 almost 5 yearsNice solution, but
input.focus()
causes the page to scroll to the bottom. It's unnecessary, at least for me - the text gets copied without it. -
zb' over 4 yearsbtw, good idea,
-
Andy over 4 yearsfantastic!!! This is a really nice quick fix
-
AATHITH RAJENDRAN over 3 yearsand what if i want to copy with my cursor?
-
d0rf47 over 2 yearshas anyone found this flag? Currently running chrom v98 and i cannot locate this flag.
-
zb' over 2 yearsyes, seems they removed it "you not need this" :)