<p>Here's more than you ever wanted to know on 404 and error templates in Craft CMS: <a href="https://nystudio107.com/blog/handling-errors-gracefully-in-craft-cms#handling-exceptions-on-the-frontend" rel="nofollow noreferrer">Handling Errors Gracefully in Craft CMS</a></p>

CC BY-SA 3.0
2017-12-06T01:52:13.170Z
2017-12-06T01:52:13.170Z
andrew.welch
<p>Yes, use <a href="http://buildwithcraft.com/docs/config-settings#errorTemplatePrefix">errorTemplatePrefix</a>.</p>

<pre><code>'errorTemplatePrefix' =&gt; "pages/",
</code></pre>

CC BY-SA 3.0
2014-07-30T16:00:13.190Z
2014-07-30T16:00:13.190Z
Marion Newlevant
<p>Wanting to move static/single templates in to a directory <code>pages</code> and thus, the path to my 404 template is now <code>pages/404.html</code>. I don't necessarily need dynamic content <a href="https://craftcms.stackexchange.com/questions/390/whats-the-best-way-to-set-up-a-content-manageable-404-page">as asked here</a>. Is there a config setting I can use to point the default 404 URI behavior to that template?</p>

<templating><404-page>
Can I define a path to my 404 template?
# Can I define a path to my 404 template?

(Asked by: username_0 on 2014-07-30)

Wanting to move static/single templates in to a directory `pages` and thus, the path to my 404 template is now `pages/404.html`. I don't necessarily need dynamic content [as asked here](https://craftcms.stackexchange.com/questions/390/whats-the-best-way-to-set-up-a-content-manageable-404-page). Is there a config setting I can use to point the default 404 URI behavior to that template?

**Tags:** templating, 404-page

---

## 2 answers

### Answer by username_2 on 2014-07-30. Score: 6 | Accepted answer

Yes, use errorTemplatePrefix.
'errorTemplatePrefix' => "pages/",


---

### Answer by username_1 on 2017-12-06. Score: 1

Here's more than you ever wanted to know on 404 and error templates in Craft CMS: [Handling Errors Gracefully in Craft CMS](https://nystudio107.com/blog/handling-errors-gracefully-in-craft-cms#handling-exceptions-on-the-frontend)


---

