code: @Override
    public int dnsDomainLevels(String host) {
      int count = 0;
      int startPos = 0;
      while ((startPos = host.indexOf(".", startPos + 1)) > -1) {
        count++;
      }
      return count;
    }
docs: ***********************************************************************
  Returns the number of DNS domain levels (number of dots) in the host name.
  
  @param host
  is the host name from the URL.
  @return number of DNS domain levels.
  **********************************************************************