WHM does have a place where you can edit the the defaultwebpage.cgi page at Account Functions > Web Template Editor. This allows you to change the appearance of the page but because it's HTML you can't give a 404 header response code.
My solution was to go a step higher and find the file causing the redirect in the first place and have that file produce a 404 response instead of redirecting to defaultwebpage.cgi.
- SSH into your server
- Browse to your htdocs directory:
cd /usr/local/apache/htdocs/
- Rename the index file to a PHP file:
mv index.html index.php
- Edit the index file:
sudo nano index.php
- Replace the contents with:
<?php header("HTTP/1.0 404 Not Found"); ?>
- Save the file: Ctrl + O
- Close the file: Ctrl + X
Now when a site cannot be found on the server it loads /usr/local/apache/htdocs/index.php which returns a 404 header and no content. You can of course add a custom message inside index.php too if you like but for my purposes a blank page was fine.