X
    Categories: How To

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:

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:

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 »

Rob: My name is Rob Barbour and I've been a geek since I was a kid - my first computer was a Timex Sinclair and then I saved up to buy a Vic 20 with my paper route money. I've also been programming since I was a kid, so you'll likely see some code thrown in where appropriate. I truly love helping people like you solve their problems and answer their questions. I've been hosting my own sites since the late 90's and know the web hosting world extremely well.
Related Post