# How to test 404.html on local server?

**URL:** <https://discourse.gohugo.io/t/how-to-test-404-html-on-local-server/681>\
**Category:** support\
**Created:** [February 2, 2015, 8:15am UTC](https://discourse.gohugo.io/t/how-to-test-404-html-on-local-server/681 "2015-02-02T08:15:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dheil](https://avatars.discourse-cdn.com/v4/letter/d/a87d85/32.png) [@dheil](https://discourse.gohugo.io/u/dheil)\
**Post date:** [February 2, 2015, 8:15am UTC](https://discourse.gohugo.io/t/how-to-test-404-html-on-local-server/681/1 "2015-02-02T08:15:57Z")

</div>

I put the layout file in “theme/layouts/404.html” and it is created and i can reach it manually (localhost:1313/404.html - but when a 404 error occurs, it won’t open up my newly created 404 page - but instead the default page with only the “404 page not found” string.

Is threre a setting in the config file i could set or something?

Besides this, i want to use the “slash at the end” syntax all over my pages because many search engines prefer that.  
so i created a [404.md](http://404.md) file in

```
/content/404.md

```

is it possible to set the generated

```
/404/index.html

```

as the 404 page?

one more question:  
Is it possible to catch 50\* Errors with hugo? Or would i just have to create a page and set it manuall in my server specific settings?

thank you guys 🙂

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [February 2, 2015, 8:43am UTC](https://discourse.gohugo.io/t/how-to-test-404-html-on-local-server/681/2 "2015-02-02T08:43:24Z")

</div>

1. The Hugo built-in server doesn’t seem to support this. It should, I’ll create an issue.
2. As to /404/index.html - this is how it is generated by default if you haven’t set uglyurls=true in the config (or, it’s created twice - once on root and secondly under /404/index.html).
3. As to 50\* errors, see 1) Hugo server has no specific error handling. The internal 404.html template was added because it’s the default error page in GitHub pages - and it’s “the only” HTTP error you shold get from your static site.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [February 2, 2015, 9:57am UTC](https://discourse.gohugo.io/t/how-to-test-404-html-on-local-server/681/3 "2015-02-02T09:57:02Z")

</div>

Issue:

> <https://github.com/gohugoio/hugo/issues/874>
>
> See
> http://discuss.gohugo.io/t/how-to-test-404-html-on-local-server/681

But if you’re not using the built in server in production, just pointing the browser directly at the page should be “as good a test”.
