disable redirect SSL to default / primary website

webstyler

Well-Known Member
Nov 20, 2003
486
4
168
Hello guys

Scenario
edit file hosts of a pc for make that anyname.com resolve to the server IP
if the anyname.com are a server account but without SSL user will be redirect to primary/main website

There is anyway to change this? for example to give an error? or redirect to not found account?

Thanks
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,290
2,438
363
cPanel Access Level
Root Administrator

webstyler

Well-Known Member
Nov 20, 2003
486
4
168
Hello

Thanks for reply

I've check the second link, that is what we need.
But seems the only solutions is to define a primary website, that is not really fine.
By this way i give traffic to other customer, and I could see content with not correct domain name on browser.

One solution may be to create a dedicate account, with error page, and elevate this to "not found" ..

But, cPanel/WHM don't already have any integrated solutions for this??

There isn't an option where if a domain is not present on server this give error (as happen for http) ??

Thanks
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,290
2,438
363
cPanel Access Level
Root Administrator
The best way would be to create a site on the server to handle this. This is a limitation of Apache as it will always try and serve the closest match to whatever request it receives, so setting up a site to be the default is the best way to handle this.