How to remove Webmaster email from pages 404
Hello guys,
How do I remove this email from the standard cPanel 404 error page?
There is no option to edit this.
This page appears when the domain does not exist on the server, but continues to point to our server.
It is very inconvenient to receive several emails per day in relation to these sites.
53501
-
404 page is available under servers document root and file name is cp_errordocument.shtml, you can edit that page as per your need. 0 -
HI @Rodrigo Gomes The correct way to make modifications to the error pages is to make the changes according to the documentation here: Error Pages - Version 72 Documentation - cPanel Documentation This would require you to create your own though. Editing cp_errordocument.shtml can be done though we can't guarantee that it won't be overwritten. The line you'd need to modify would be the one as follows: Please forward this error screen to 's ?subject=Error message [] for port on "> WebMaster.0 -
I was able to change this by editing the file cp_errordocument.shtml. Is there a way to permanently remove this email? Or stop displaying error pages for sites that are not hosted on our server. 0 -
Hi @Rodrigo Gomes This works only if the domain has an account in cPanel, which is not the case.
If the domain isn't hosted on your server and the account is removed it shouldn't be displaying a 404 which is the point I've been trying to make.There is no option to edit 404 pages in Web Template Editor. I did this by modifying the cp_errordocument.shtml file, but I believe it will be overwritten.
The point being though When a domain is not hosted on your server the default page should be displayed which is why I suggested this. If you're getting a 404 when attempting to view a site that is no longer hosted on your server it sounds like you may not have removed the account fully. Thanks!0 -
If you're getting a 404 when attempting to view a site that is no longer hosted on your server it sounds like you may not have removed the account fully.
Hello @cPanelLauren, I can ensure that the domain is no longer hosted on the server. The domain uses Cloudflare, so it keeps pointing to the IP of our server. If you access the URI / it displays the default page. If you access an any URI (example /non-existent-page/), it will display a 404 error page. Thanks!0 -
Hi @Rodrigo Gomes In that circumstance, there's nothing that can change that behavior by default. The only possible solution I could think of would be a domain forwarder - you can find the documentation on this here Setup Edit Domain Forwarding - Version 72 Documentation - cPanel Documentation Thanks! 0 -
Hello @cPanelLauren , The domain is no longer hosted on our server, it has been completely removed. I did not understand how the domain forwarder could help me in this case. cPanel by default displays a 404 error page for sites that are no longer hosted on our server and this page includes the email address of our system, which is quite inconvenient. And as far as I can see, there is not an option to edit that page through WHM or permanently. Any domain on the internet can point to the IP of our server, this is not something we can control by WHM. And there is no option to not display the default cPanel page for domains that are not hosted on our system. 0 -
Any domain on the internet can point to the IP of our server, this is not something we can control by WHM. And there is no option to not display the default cPanel page for domains that are not hosted on our system
Both of these statements are correct this is true for any hosting platform. I can point any domain to any server - now that doesn't mean my domain is going to work it just means I'll get their default page or their instructions for domains not hosted on the server. This can't be changed due to lack of control over where people point their domains. The domain forwarder allows you to redirect a domain that is not hosted on your server to a location you choose. I'm not sure what you're expecting to happen in this instance, a 404 for a URL that doesn't exist but is pointed at your server is expected. The default page for a domain that is not hosted on your server but pointed to your server is the expected behavior. If you want to modify this behavior you can do so by using the domain forwarder.0 -
Hello @cPanelLauren , I get it. But, what I miss is more control over that default page. I wish I did not display it, or be able to change it. Forwarding the domain is impractical, it would have to be done manually for each new domain that points to our server. 0 -
Hi @Rodrigo Gomes I've already shown you how to change the default page though, this is perfectly possible. The default page is modifiable by going to WHM>>Account Functions>>Web Template Editor -> Default Website Page Beyond that it is beyond our control to determine which domains are allowed to point their IP's to you. 0 -
Hello @cPanelLauren , I've already shown you how to change the default page though, this is perfectly possible. The default page is modifiable by going to WHM>>Account Functions>>Web Template Editor -> Default Website Page
This does not include the default 404 error page, which is the subject of this topic. Where it is necessary to change the file cp_errordocument.shtml and may be overwritten.Beyond that it is beyond our control to determine which domains are allowed to point their IP's to you.
I know that. But it is my control to choose what to show for them.0 -
I think to do this, I will need to send a feature request. So I go ahead and I will make this request. Thank you. 0 -
Hi @Rodrigo Gomes You might also want to take a look at this thread where someone asked a similar question What they did to modify their configuration may also work for you. 0 -
Hello @cPanelLauren , This gave me an idea of how I can resolve this in a definitive way through VirtualHost, thank you! 0 -
Hi @Rodrigo Gomes I'm glad to hear that! If your idea works please let us know what you did so it may help others! Thanks! 0 -
I just added the code below into pre_virtualhost_global.conf: DocumentRoot /var/www/html ErrorDocument 404 /index.html
You change this 123.456.789.10:80 to the primary IP of your server and the port you want.0 -
Hi @Rodrigo Gomes Thanks for sharing that with us. I'm glad you were able to find a solution that worked for you. 0
Please sign in to leave a comment.
Comments
19 comments