# Custom 404 Page Not Rendering Correctly

**URL:** <https://forums.realmacsoftware.com/t/custom-404-page-not-rendering-correctly/55900>\
**Category:** Elements\
**Created:** [April 28, 2026, 2:14pm UTC](https://forums.realmacsoftware.com/t/custom-404-page-not-rendering-correctly/55900 "2026-04-28T14:14:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chet](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/chet/32/35396_2.png) [@chet](https://forums.realmacsoftware.com/u/chet)\
**Post date:** [April 28, 2026, 2:14pm UTC](https://forums.realmacsoftware.com/t/custom-404-page-not-rendering-correctly/55900/1 "2026-04-28T14:14:43Z")

</div>

I have built a custom [404 page](https://flyhxaviation.com/404/) for my website.

When you visit that page directly, it looks and renders perfectly. I have a gradient background set using the Container component, a some text, and a few buttons.

The problem is, when someone goes to a bad URL that should 404, [like this](https://flyhxaviation.com/fred), the 404 page shows up but the background gradient doesn’t show up and the spacing in the Container component is not respected.

I have my .htaccess set to: `ErrorDocument 404 /404/`

Is there an obvious mistake that I’m making?

---

<div class="post-metadata">

**Author:** ![annebourdon](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/annebourdon/32/2391_2.png) [@annebourdon](https://forums.realmacsoftware.com/u/annebourdon)\
**Post date:** [April 28, 2026, 2:48pm UTC](https://forums.realmacsoftware.com/t/custom-404-page-not-rendering-correctly/55900/2 "2026-04-28T14:48:01Z")

</div>

Hi,

In the “headers” of my 404 page (edit extra code Button / page inspector), I have :  
`<?php header("HTTP/1.1 404 Not Found");?><base href="your-404-page-url-here">`

---

<div class="post-metadata">

**Author:** ![chet](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/chet/32/35396_2.png) [@chet](https://forums.realmacsoftware.com/u/chet)\
**Post date:** [April 28, 2026, 5:51pm UTC](https://forums.realmacsoftware.com/t/custom-404-page-not-rendering-correctly/55900/4 "2026-04-28T17:51:20Z")

</div>

Thanks! That worked like a charm.

For anyone looking for the “Extra Code” button, I’ve attached a screenshot.

 ![Screenshot 2026-04-28 at 1.50.09 PM](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/d/2/d253de73e76835497ad8223b5db693e7eeb6c720.png)
