Craft multisite site without www redirects unwanted to default site I'm working on a multisite Craft CMS 3 website. When I'll go to www.site-a.com (default) and www.site-b.com this works fine. The correct sites and templates are displayed. But if I'll go to site-b.com (without www) I'll redirected to www.site-a.com. The sites are not multilangual and doesn't have a seperated webroot. I'll point the domains to the same webroot. This is how I'll set it up in the general config:

   'production' =&gt; [
        'env'                   =&gt; 'production',
        'siteUrl'               =&gt; array(
            'default'           =&gt; 'https://www.site-a.com/',
            'second'            =&gt; 'https://www.site-b.com/'
        ),
    ],


In my htaccess I'll force to use to the www domain, like this:

    # -----------------------
    # Force www
    # -----------------------
    RewriteCond %{SERVER_ADMIN} !^dev$
    RewriteCond %{HTTP_HOST} !^localhost$
    RewriteRule ^(.*)$ https://www.{HTTP_HOST}.com/$1 [L,R=301,NC]


What I'll do wrong?
The problem is that the force ww redirect isn't setup correctly. This must be setup like this:

    # Force www
    # -----------------------
    RewriteCond %{HTTP_HOST} ^domain-a.com [NC]
    RewriteRule ^(.*)$ https://www.domain-a.com/$1 [L,R=301,NC]

    RewriteCond %{HTTP_HOST} ^domain-b.com [NC]
    RewriteRule ^(.*)$ https://www.domain-b.com/$1 [L,R=301,NC]


Also both domains must point to the same server.