public function isWildcardDomain(string $domain): bool
    {
        $domain = rtrim($domain, '.').'.';
        $pattern = '/^\*\.(?:[a-zA-Z0-9\-\_]+\.)*$/';

        return (bool) preg_match($pattern, $domain);
    }