public function setDomain(string $domain = '', bool $forSubdomains = true): void
    {
        $subdomainIndicator = $forSubdomains === true ? '.' : '';
        $this->domain = \sprintf('%s%s', $subdomainIndicator, \preg_replace('/^(\.)?(preview\.)?/', '', $domain));
    }