With readline apps ( bash gcc etc. ), ctrl-w by default deletes words delimited by whitespace. Since, I work with URLs and domain names, I want readline to delete based on non-word delimiters [^0-9A-Za-z].
Add the following to your ~/.inputrc and then hit ctrl-x ctrl-r to re-read your ~/.inputrc
"\C-xB": backward-word "\C-xK": kill-region "\C-xS": set-mark "\C-w": "\C-xS\C-xB\C-xK"