This is a very simple class that can be used to extract the domain of an URL. It parses the URL and returns the host domain. If the host starts with www. , that prefix is removed.