404

The 404 template displays the content of the page shown when a customer enters a non-existent store URL.

image.png


Location

The 404 template is located in the templates directory of the theme:

└── theme
├── layout
├── templates
| ...
| ├── 404.json
| ...
...

Content

The 404 template does not have a specific object. However, it should clearly inform the customer that the page they are searching for cannot be found.

Provide clear options for what to do next. For example, you can provide links to popular pages and a search bar to assist customers in finding what they need, or links to direct them to your homepage or a collection page for Continue shopping:

<h1 class="title">
404 Page Not Found
</h1>
<a href="{{routes.all_products_collection_url}}" class="shopping-button">
Continue Shopping
</a>
Tip

If you are using a JSON template, any HTML or Handlebars code should be included in the section referenced by the template.


Was this article helpful to you?