skip to Main Content

I’ve got the following problem. We have a SSL-certificate for a domain with a prepended ‘www’, like ‘www.test.com’.

I’ve integrated that certificate with Plesk for this domain and it works fine, when somebody goes directly to ‘www.test.com’. But when I enter only ‘http://test.com’, he won’t recognize the certificate and shows a warning. How can I prevent this? Do I need an extra certificate (hope not) or can I redirect the domain within Plesk directly. A PHP-header isn’t enough, because the redirection would take place after the browser tries to establish the ssl-connection.

And because the Plesk admin panel runs on this same domain, we have the same problem with ‘http://test.com:8443’ …

So basically:

'https://www.test.com' - fine
'https://test.com' - not working

'https://www.test.com:8443' - fine
'https://test.com:8443' - not working

Any suggestions would be nice, thanks a lot,

Carl

2

Answers


  1. Try adding a this rule to .htaccess in the public root. It should redirect from test.com to http://www.test.com for SSL connections:

    RewriteRule ^/(.*):SSL$   https://www.test.com/$1 [R,L]
    

    Learn more about htaccess redirects

    Typically, the certificate needs to be purchased for specific subdomain. Some Certificate Issuers do offer a cert for the .test.com domain that includes all subdomains (including test.com and http://www.test.com). If you’re unsure, you should contact your certificate issuer directly.

    Login or Signup to reply.
  2. Well first what plesk version with which OS you have, It’s Linux or windows if Windows to Add reWrite URL in IIS setting on under particular.

    If you have Linux with plesk any version because it’s not matter either you have plesk or cpanel.

    with Linux
    Add ReWrite module in .htaccess for domain purpose only not for access plesk panel with specific port 8443

    8443 port only configured with plesk shared license.

    Use follow to avoid Trusted message

    https://www.test.com – fine
    https://test.com‘ – not working
    in this case use URL rewrite redirection as above said steps.

    =============================

    Check Cname Entry in particular domain DNS record.

    I hope this helps.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search