cPanel WHM Change The Default Website Page

Change The Default Website Page

I was recently looking at my apache traffic and noticed some HEAD hits to my ip address directly instead of any of my hosted domains (probably scanning for vulnerabilities).  I then browsed the address and saw that it was giving away more information than I wanted.  It basically says “If you are the owner of this website, please contact your hosting provider”. Ok – so how do I change the default website page for my server’s IP address on my cPanel/WHM server?

All of my sites are properly configured, so the only time this would show is if someone went to http://{ip address}.

Here’s the screenshot with my server information blurred:

whm cpanel if you are the owner - Change The Default Website Page

Sure someone can scan for the various cPanel WHM ports, but I figured why make it easier.

There are many articles on how to set the default website page for a hosted domain on a shared IP, but I need to do this for my server’s main IP.  I started digging around the server and the first place I looked was /var/www/html (the default location for CentOS) and thought for sure this would solve it.  Nope.  There wasn’t any file in there that was used for the missing home page issue.  Now I was wondering how to change the default website page.

How To Change The Default Website Page

I then started digging around in WHM and found the Web Templates option – bingo – this is where you can edit the default page shown when there’s no index file set.  Here’s what it looks like:

whm web template editor - Change The Default Website Page

If you’re familiar with HTML, then you can edit this easily.  If you’re not familiar with HTML, then you can either Google it or pay someone to modify it for you.  In my case I just wanted a blank page, so I deleted all the code and just put this in:  <html></html>

They also make it easy to get the original code back with the “Revert to Default” button.

This will take effect for ALL sites on your server, but you can easily change the default document for individual sites.  I’ll go into that in a future how to post.

Click For Our Hosting Reviews »

Disclaimer: A great deal of effort goes into maintaining a website like this and at the time of writing we believe the data was correct, but is provided without any warranty. It is your responsibility to to check the official website for their current offers, terms, details, and other useful information. We receive compensation from many of the offers displayed and that may or may not influence how and where these offers are displayed (including the order). We do not have all available offers for many reasons. All opinions we express on the site are solely ours and are not approved or provided to us by the companies.