Skip to main content

Server hostname is resolving to a customers site when using HTTPS

Comments

5 comments

  • Jcats
    Its because the server uses SNI, any non SSL domains will automatically load using the SSL of the first virtualhost in apache conf that reside on the same IP. What you can do is, generate a self signed certificate, unless you already have a signed certificate for the hostname, OR if you are using AutoSSL you should already have an SSL generated for server.example.com but its only installed on cPanel services, not on port 443. Go into WHM: Home " SSL/TLS " Install an SSL Certificate on a Domain In the "Domain:" field, put in server.example.com and click Autofill. If you already have a cert for the hostname, then it will autofill, then click Install. Now go to: Home " SSL/TLS " Manage SSL Hosts scroll down to server.example.com and click "Make Primary". Now anytime someone goes to the HTTPS for a site that does NOT have an SSL installed, it will go to your cPanel default page instead of bringing up someone else's website. Hope this helps!
    0
  • cPanelMichael
    Hello, The instructions in the previous post should help. Let us know if you encounter any difficulties or have additional questions. Thanks!
    0
  • mikefromnz
    Its because the server uses SNI, any non SSL domains will automatically load using the SSL of the first virtualhost in apache conf that reside on the same IP. What you can do is, generate a self signed certificate, unless you already have a signed certificate for the hostname, OR if you are using AutoSSL you should already have an SSL generated for server.example.com but its only installed on cPanel services, not on port 443.

    You literally are a genius, thank you so much! perfect instructions and immediately solved the issue, awesome!!!!
    0
  • Jcats
    Glad to hear it :)
    0
  • Infopro
    Thanks for updating your thread. :)
    0

Please sign in to leave a comment.