what is the best way to define URL or at least text to show when WHM server hostname or IP is opened in the web browser?

Unwanted behavior:
I faced the issue that when i opened it, it shown SSL error and then one of the websites hosted on that server, and it was questionable content site, so this is quite bad when this happens.

What i needed:
To show custom text or redirect to certain URL when WHM server IP or hostname is opened in web browser.

I found one hack, big downside of that is that you have to apply it manually and you have to "hardcode" server IP, so it is not flexible hack.

Open: WHM »Service Configuration »Apache Configuration »Include Editor [Documentation]» Pre VirtualHost Include »All versions

Insert virtualhost entry:
<VirtualHost YourWHMServerIPHere:80>
ServerName YourWHMServerIPHere
DocumentRoot /home/cPanelNameWhereIsPageToShow/public_html/directorynamehere
ServerAdmin [email protected]

<IfModule suphp_module>
suPHP_UserGroup cPanelNameWhereIsPageToShow cPanelNameWhereIsPageToShow

+ maybe also same virtualhost entry only for port 443 instead of 80.
for EasyApache4, maybe "suPHP_UserGroup " line should have usernames as: nobody nobody

That hack may not fully work and you still see SSL error when accessing WHM hostname. Try: WHM / SSL/TLS / Install an SSL Certificate on a Domain / enter your.host.name into domain field and click "Autofill by Domain". Then it recognized valid signed (non self-signed) SSL (if you have self-signed, then first try advice here. Then https://whmhost.name.here/ started working.