<p>If <code>devMode</code> is on, you will always see the above exception page. Turn it off to see your 404 page, or just navigate directly to the template, e.g. <a href="http://example.com/404" rel="nofollow noreferrer">http://example.com/404</a></p>
<p>More here: <a href="https://nystudio107.com/blog/handling-errors-gracefully-in-craft-cms#handling-exceptions-on-the-frontend" rel="nofollow noreferrer">https://nystudio107.com/blog/handling-errors-gracefully-in-craft-cms#handling-exceptions-on-the-frontend</a></p>

CC BY-SA 4.0
2021-07-06T17:31:43.430Z
Thanks @andrew.welch. I've read your article, it's very helpful. However, I have this:


return [
    // Global settings
    '*' => [
4midori
CC BY-SA 4.0
2021-07-06T17:37:30.320Z
I have read your article, thanks, it's very helpful. Turns out this was a PEBMAK problem, I had my devMode statement in the wrong place.
4midori
CC BY-SA 4.0
2021-07-02T23:36:08.913Z
2021-07-02T23:36:08.913Z
andrew.welch
<p>I look at past Q &amp; A about this, but am still perplexed.</p>
<ul>
<li>Not logged in to CP or frontend</li>
<li>I have a simple template called 404.twig which resides in the <strong>templates</strong> folder</li>
<li>I can access the template directly at domain.com/404</li>
<li>This is a multi-site Craft install</li>
<li>Hit an invalid URL, like domain.com/oasdoasd</li>
<li>See this</li>
</ul>
<p><a href="https://i.sstatic.net/Y2kvG.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Y2kvG.jpg" alt="enter image description here" /></a></p>

<error><404><error-handling>
Basic 404 setup not working
# Basic 404 setup not working

(Asked by: username_0 on 2021-07-02)

I look at past Q & A about this, but am still perplexed.

* Not logged in to CP or frontend
* I have a simple template called 404.twig which resides in the **templates** folder
* I can access the template directly at domain.com/404
* This is a multi-site Craft install
* Hit an invalid URL, like domain.com/oasdoasd
* See this

[![enter image description here](https://i.sstatic.net/Y2kvG.jpg)](https://i.sstatic.net/Y2kvG.jpg)

**Tags:** error, 404, error-handling


---

## 1 answers

### Answer by username_1 on 2021-07-02. Score: 4 | Accepted answer

If `devMode` is on, you will always see the above exception page. Turn it off to see your 404 page, or just navigate directly to the template, e.g. <http://example.com/404>

More here: <https://nystudio107.com/blog/handling-errors-gracefully-in-craft-cms#handling-exceptions-on-the-frontend>

> **Comments:**
> **username_0**: Thanks @username_1. I've read your article, it's very helpful. However, I have this:   return [     // Global settings     '*' => [  
> **username_0**: I have read your article, thanks, it's very helpful. Turns out this was a PEBMAK problem, I had my devMode statement in the wrong place.  

---

