private static function domain(string $url): ?string
    {
        $domain = parse_url($url, PHP_URL_HOST);

        if (null !== $domain) {
            return implode('.', array_slice(explode('.', $domain), -2));
        }

        return null;
    }