public function getPrimaryRedirectUrl(Site $site)
    {
        $currentDomain = $site->getDomain()->getDomainName();

        $ipValidator = new Ip();
        $isIp = $ipValidator->isValid($currentDomain);

        if ($isIp) {
            return null;
        }

        $primaryDomain = $site->getDomain()->getPrimary();

        if (empty($primaryDomain)) {
            return null;
        }

        if ($primaryDomain->getDomainName() == $currentDomain) {
            return null;
        }

        return $primaryDomain->getDomainName();
    }