src/includes/classes/Core/Utils/UrlCurrent.php
public function rootHost(bool $with_port = true): string
    {
        if (($root_host = &$this->cacheKey(__FUNCTION__, $with_port)) !== null) {
            return $root_host; // Cached this already.
        }
        $name_parts       = explode('.', $this->host(false));
        $root_name        = implode('.', array_slice($name_parts, -2));
        $port             = $this->port(); // Might be needed in next line.
        return $root_host = $root_name.(!$with_port ? '' : (isset($port[0]) ? ':'.$port : ''));
    }
public function rootHost(bool $with_port = true): string
    {
        if (($root_host = &$this->cacheKey(__FUNCTION__, $with_port)) !== null) {
            return $root_host; // Cached this already.
        }
        $name_parts       = explode('.', $this->host(false));
        $root_name        = implode('.', array_slice($name_parts, -2));
        $port             = $this->port(); // Might be needed in next line.
        return $root_host = $root_name.(!$with_port ? '' : (isset($port[0]) ? ':'.$port : ''));
    }
Current root host name; lowercase.

@since 151002 Adding root host support.

@param bool $with_port With port number?

@return string Current root host name; lowercase.