Create a Custom 403 Page That’s Branded, Cache-Friendly, and ASCII-Cool
Why a Custom 403 Page Matters
When a visitor is denied access—whether due to firewall rules, bot filters, or restricted paths—the default server response is often cold and confusing. Worse, if the 403.shtml
file is missing, LiteSpeed may shortcut to a 404, wasting resources and bloating logs.
A custom 403 page solves this by:
- ✅ Delivering a clear, branded message
- ✅ Reducing fallback logic and server load
- ✅ Making blocked traffic cacheable by BunnyCDN
- ✅ Turning denial into a teachable, stylish moment
What Was Happening (And Why It’s Now Fixed)
LiteSpeed was attempting to serve a 403.shtml
page for denied requests, but the file didn’t exist. This caused:
- 🔁 Repeated fallback attempts
- 📉 Uncacheable responses
- 📊 Log spam with “File not found” entries
By deploying a branded 403.shtml
, we restored clarity, reduced server strain, and improved cache behavior.
MegaHost’s Branded 403 Template
Here’s the live version we deployed today, featuring your custom ASCII banner:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>403 Forbidden</title>
<style>
body { font-family: monospace; background: #111; color: #eee; text-align: center; padding: 50px; }
.ascii { color: #0f0; font-size: 14px; margin-bottom: 20px; }
</style>
</head>
<body>
<div class="ascii">
<pre>
_____ ___ ___ __
/ \ ____ _________ / | \ ____ _______/ |_
/ \ / \_/ __ \ / ___\__ \ / ~ \/ _ \/ ___/\ __\
/ Y \ ___// /_/ > __ \\ Y ( <_> )___ \ | |
\____|__ /\___ >___ (____ /\___|_ / \____/____ > |__|
\/ \/_____/ \/ \/ \/
</pre>
</div>
<h1>Access Denied</h1>
<p>Your request was blocked by our security filters.</p>
</body>
</html>
How to Deploy It
- Create the file:
nano /home/"username"/public_html/403.shtml
Or alternatively, in cPanel File Manager, click “+File” New File.
- Paste the code above, replacing ASCII art if desired.
- Set permissions:
chown username:username /home/username/public_html/403.shtml
chmod 644 /home/username/public_html/403.shtml
Or alternatively, in cPanel File Manager.
🎨 Variant Styles
Here are two alternate themes you can offer to clients or use for different branding moods:
🌞 Light Theme (White Background)
body {
font-family: monospace;
background: #fff;
color: #222;
text-align: center;
padding: 50px;
}
.ascii {
color: #444;
font-size: 14px;
margin-bottom: 20px;
}
🌌 MegaHost Midnight Clarity Theme (Deep Blue)
body {
font-family: monospace;
background: #0a1a2f;
color: #fff;
text-align: center;
padding: 50px;
}
.ascii {
color: #00ffff;
font-size: 14px;
margin-bottom: 20px;
}
📬 Client Communication Template
We’ve deployed a branded 403 page to replace generic denial messages. This improves clarity and performance, and ensures blocked traffic is handled cleanly.
This change is harmless and was not caused by any issue with your site. You’re welcome to customize the page, including the ASCII art and message. Let us know if you’d like help styling it.
🧠 Final Thoughts
A custom 403 page isn’t just a patch—it’s a performance upgrade, a branding opportunity, and a cache-hardening win. Whether you’re blocking bots or geo-filtering traffic, make sure your denial page reflects your standards.