core/src/main/java/com/digitalpebble/stormcrawler/util/URLUtil.java
public static String getHost(String url) {
        try {
            return new URL(url).getHost().toLowerCase(Locale.ROOT);
        } catch (MalformedURLException e) {
            return null;
        }
    }
public static String getHost(String url) {
        try {
            return new URL(url).getHost().toLowerCase(Locale.ROOT);
        } catch (MalformedURLException e) {
            return null;
        }
    }
Returns the lowercased hostname for the url or null if the url is not
well formed.

@param url
The url to check.
@return String The hostname for the url.