code: public static boolean isSameDomain(String currentUrl, URI url) {
  		String current = URI.create(getBaseUrl(currentUrl)).getHost()
  				.toLowerCase();
  		String original = url.getHost().toLowerCase();
  		return current.endsWith(original);
  
  	}
docs: Checks if the given URL is part of the domain, or a sub-domain of the given
  {@link java.net.URI}.
  
  @param currentUrl The url you want to check.
  @param url        The URL acting as the base.
  @return If the URL is part of the domain.