Website Loads the Content of another website if ssl is not installed

azadhussnain

Well-Known Member
May 28, 2020
63
0
6
India
cPanel Access Level
Root Administrator
Hello ! I am facing an weird issue in my server.
Actually, Yesterday one customer purchased hosting from me but when i open his website ( suppose example.com ) then it shows the content of another website hosted on my same server ( suppose example2.com ).
and when i open example.com with https:// then my chrome browser shows an SSL error that example.com is using ssl from *.example2.com

and when i installed SSL on example.com then it's working properly and loading the content of example.com

i think it's an SSL issue , i am using Let's Encrypt AutoSSL
anyone can tell me how to fix this issue? because it looks weird .
 

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
573
266
138
IN
cPanel Access Level
Root Administrator
If the accounts example and example2 are assigned a shared IP address, and a SSL certificate is installed on example2.com only, then any secure request to a domain name example.com on that IP address will load the contents of the domain name the certificate is installed for(example2.com). This is by default behavior.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,505
2,605
363
cPanel Access Level
Root Administrator

Kent Brockman

Well-Known Member
PartnerNOC
Jan 20, 2008
1,354
79
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
Hi there, I'm investigating this. The hostname certificate should be made Primary by default. Always.
What prevents cPanel from doing this automagically and avoiding the bad behaviour to the end users?
 
  • Like
Reactions: ejsolutions

Kent Brockman

Well-Known Member
PartnerNOC
Jan 20, 2008
1,354
79
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
@Kent Brockman - you'd actually be surprised how many people don't want that to happen.
Ok, I think I can understand why. But when it comes to a reseller, showing an unrecognized domain by default is completely puzzling for them and their end users. This should be more intuitively explained and highlighted in the Tweak Settings, at the very least...

Yes, I did that, and it works nice ONLY when your server has just one IP address AND the damn Sectigo thing have worked to provide the hostname with a valid SSL.
Those things are a bit messy and you guys should work it out a bit more.