it should probably just try to strip ^www\d*?\. from the domain and leave everything else, rather than strip off the first component of the hostname regardless of what it is.
better to print too long a url for some than too short for things like example.github.com, code.google.com, etc.
better to print too long a url for some than too short for things like example.github.com, code.google.com, etc.