Alias http://alias.com for the main domain https://example.com gets redirected to https://example.com and SSL warning about insecure connection appears.
There is Permanent SEO-safe 301 redirect from HTTP to HTTPS option enabled and valid signed certificate for the main domain.
Expected behavior. When Permanent SEO-safe 301 redirect from HTTP to HTTPS is enabled on an alias, there would be 2 redirects:
- from http://alias.com to https://alias.com
- from https://alias.com to the main domain https://example.com
As a workaround, Turn off SEO-safe permanent redirect at the alias' side at Domains > alias.com > uncheck SEO-safe redirect option
Or, add the following line to nginx additional directives in Domain > example.com > Apache & nginx Settings:
return 301 https://www.example.tld$request_uri;