SOLVED Why when Any domain points to my server IP WHM opens one of hosted website

Operating System & Version
Centos 7
cPanel & WHM Version
94

AladdinJ

Member
Jul 23, 2020
7
2
3
UAE
cPanel Access Level
Root Administrator
Hello

the problem is
when any domain point its DNS to my Server IP ( this domain not hosted on my server just linked to my server )

WHM open one fixed website from my server (I think it's the first account added to WHM)


for example, try to open
REDACTED

How I can solve this and show any error message says that is this domain not hosted on this server or anything else instead of showing one of my hosted websites
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,151
523
273
cPanel Access Level
Root Administrator
Hey there! This question comes up frequently, and the answer is that it's just the way Apache handles traffic. It tries to serve the best content match that it can, do if the domain requested doesn't exist, it will serve the first domain in the configuration.

You may want to look into using this tool to setup a default virtual host:


but I can confirm what you are seeing is normal behavior.
 
  • Like
Reactions: AladdinJ