mage2kishan/module-not-found-page

Custom 404 Not Found Page for Magento 2. Replaces the default CMS 404 page with a modern, fully configurable design featuring dynamic category links, integrated search bar, and admin-controlled content. Configurable heading, subheading, search toggle, popular-links toggle, and contact information —

Maintainers

Package info

github.com/mage2sk/module-not-found-page

Homepage

Language:HTML

Type:magento2-module

pkg:composer/mage2kishan/module-not-found-page

Statistics

Installs: 8

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.1 2026-04-17 15:00 UTC

This package is auto-updated.

Last update: 2026-04-17 15:02:41 UTC


README

Custom 404 Not Found Page for Magento 2 | Panth Infotech

Magento 2.4.4 - 2.4.8 PHP 8.1 - 8.4 Hyva + Luma Packagist Upwork Top Rated Plus Panth Infotech Agency Website Get a Quote

Turn your Magento 2 "Whoops, our bad..." page into a modern, conversion-friendly 404 experience — dynamic category links pulled live from the catalog, an integrated search bar, fully configurable heading and subheading, popular links toggle, and contact info block. Store-view scoped. Works on both Hyva and Luma storefronts.

Panth Not Found Page replaces Magento's stock no-route (404) page with a polished, on-brand error page that keeps shoppers on your store instead of sending them to the exit. Instead of a dead-end message, visitors see a clean layout with a prominent search bar, dynamic top-level category links pulled live from your catalog, configurable heading and subheading per store view, an optional popular links list, and a contact info block with email and phone. Every text string, toggle, and link set is scoped at store-view level, so multi-language and multi-brand storefronts render the correct 404 for each locale.

The module hooks into Magento's standard cms/noroute/index routing — no core overrides, no layout hacks, no third-party theme dependencies. It ships native templates for both Hyva (Alpine.js + Tailwind CSS) and Luma (Knockout + LESS), so whichever theme your store runs, the 404 feels like it was designed for that theme from day one.

🚀 Need a Custom Magento 2 404 Page or Module?

Get a free quote within 24 hours — custom 404 designs, custom modules, Hyva theme work, performance optimization, migrations, and more.

Get a Free Quote

🏆 Kishan Savaliya

Top Rated Plus on Upwork

Hire on Upwork

100% Job Success • 10+ Years Magento Experience Adobe Certified • Hyva Specialist

🏢 Panth Infotech Agency

Magento Development Team

Visit Agency

Custom Modules • Theme Design • Migrations Performance • SEO • Adobe Commerce Cloud

Visit our website: kishansavaliya.com  |  Get a quote: kishansavaliya.com/get-quote

Table of Contents

Why Replace the Default 404?

Magento 2's stock 404 page is functional but bland — a generic "Whoops, our bad..." headline, a tiny search box, and no path back into the store. That is a bad experience for shoppers who landed on a dead link, and it is a missed conversion opportunity for your store.

Panth Not Found Page fixes this with a layout built around three questions a lost visitor actually has:

  1. "Where am I?" — a big, branded heading and subheading you control per store view
  2. "How do I find what I wanted?" — a prominent search bar and dynamic category shortcuts
  3. "How do I reach a human?" — contact info (email, phone) rendered inline on the page

The result is a 404 that looks intentional, keeps bounce rate down, and gives shoppers a clear next step.

Key Features

Dynamic Category Links

  • Pulls top-level categories live from your catalog — no manual link maintenance
  • Respects the active store view's root category and category visibility rules
  • Displays category names in the shopper's language automatically
  • Graceful fallback if no categories are active

Integrated Search Bar

  • Prominent search form rendered inline on the 404 page
  • Posts to Magento's standard catalogsearch/result/index endpoint
  • Plays nicely with Elasticsearch, OpenSearch, and third-party search providers

Configurable Heading and Subheading

  • Set your own H1 heading and subheading per store view
  • Supports HTML for bold/italic emphasis
  • Translatable via Magento's standard translation CSV files

Popular Links Toggle

  • Optional "Popular Links" block shoppers can jump to (About, Contact, Shipping, etc.)
  • Enable/disable per store view — hide it entirely if you don't need it
  • Link list fully editable from admin

Contact Info Block

  • Show email and phone directly on the 404 page so lost shoppers can reach you
  • Email uses mailto:, phone uses tel: — one-tap on mobile
  • Each field independently toggleable

Store-View Scoped

  • Every setting scopes at store view — different heading, different contact email, different popular links per locale or brand
  • Clean multi-store and multi-language behavior out of the box

Hyva + Luma Native

  • Separate templates for Hyva (Alpine.js + Tailwind) and Luma (Knockout + LESS)
  • Theme detected automatically via Panth_Core helper
  • No JS library conflicts, no forced theme dependencies

Zero Core Overrides

  • Uses Magento's standard cms/noroute/index routing
  • No layout XML hacks on core pages, no controller rewrites, no plugins on FrontController
  • Compatible with custom routers, maintenance mode, and security modules

Compatibility

Requirement Versions Supported
Magento Open Source 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8
Adobe Commerce 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8
Adobe Commerce Cloud 2.4.4 — 2.4.8
PHP 8.1.x, 8.2.x, 8.3.x, 8.4.x
Hyva Theme 1.3+
Luma Theme Native support
Required Dependency mage2kishan/module-core (free)

Tested on:

  • Magento 2.4.8-p4 with PHP 8.4 (Hyva 1.3.x + Luma)
  • Magento 2.4.7-p3 with PHP 8.3
  • Magento 2.4.6-p8 with PHP 8.2

Installation

Composer Installation (Recommended)

composer require mage2kishan/module-not-found-page
bin/magento module:enable Panth_Core Panth_NotFoundPage
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush

Manual Installation via ZIP

  1. Download the latest release from Packagist or the Adobe Commerce Marketplace
  2. Extract the contents to app/code/Panth/NotFoundPage/ in your Magento installation
  3. Also install mage2kishan/module-core if it is not already present
  4. Run the commands listed above starting from bin/magento module:enable

Verify Installation

bin/magento module:status Panth_NotFoundPage
# Expected: Module is enabled

Then visit any invalid URL on your storefront, for example https://yourstore.com/this-page-does-not-exist, to see the new 404 page render.

Configuration

Navigate to Admin → Stores → Configuration → Panth Extensions → Not Found Page.

Setting Scope Default Description
Enable Module Store View Yes Master toggle. When off, Magento's default no-route page is used.
Heading Store View Page Not Found The big H1 shown at the top of the 404 page.
Subheading Store View The page you are looking for could not be found. Supporting copy under the heading. HTML allowed.
Show Search Bar Store View Yes Render the integrated search form.
Show Category Links Store View Yes Pull and render top-level categories from the active catalog.
Show Popular Links Store View Yes Render the optional Popular Links block.
Popular Links Store View (empty) Editable list of label/URL pairs — About Us, Contact, Shipping, etc.
Show Contact Email Store View Yes Show the contact email row.
Contact Email Store View info@example.com Email address displayed (rendered as mailto:).
Show Contact Phone Store View Yes Show the contact phone row.
Contact Phone Store View +1 (555) 000-0000 Phone number displayed (rendered as tel:).

All text fields are translatable. Settings take effect immediately after a cache flush.

How It Works

Panth Not Found Page does not override Magento's routing. Instead, it attaches to the built-in cms/noroute/index handler that Magento already invokes for any unresolved URL, and replaces the block rendered under the content container with the module's own block:

  1. Magento's front controller fails to match a route → dispatches cms/noroute/index
  2. The module's layout update replaces the stock no-route block with Panth\NotFoundPage\Block\NotFound
  3. The block reads all settings via Panth\NotFoundPage\Helper\Config (scoped per store view)
  4. The correct template is selected based on Panth\Core\Helper\Theme::isHyva() — Hyva template for Hyva stores, Luma template for everything else
  5. Top-level categories are loaded via the category collection, filtered to is_active = 1 and the store's root category
  6. The response is returned with an HTTP 404 status code — correct for SEO and crawlers

Because the module uses the stock noroute flow, it is compatible with every Magento feature that depends on it: maintenance pages, URL rewrites, custom routers, admin URL checks, and security modules.

Hyva and Luma Templates

The module ships two independent template sets:

Hyva Template

  • Built with Alpine.js and Tailwind CSS
  • Zero jQuery, zero RequireJS
  • Uses Hyva's standard form styling for the search bar
  • Renders under view/frontend/templates/hyva/notfound.phtml

Luma Template

  • Built with Knockout and LESS
  • Inherits Magento/luma search form styling
  • Renders under view/frontend/templates/luma/notfound.phtml

Theme detection is automatic via Panth\Core\Helper\Theme — you do not need to configure which template to use.

SEO and Analytics

  • Correct HTTP status: the page returns 404 Not Found so Google and other crawlers mark the URL as missing (stock Magento does this correctly; the module preserves it)
  • Robots meta: noindex, nofollow is emitted by default, matching Magento's stock behavior
  • Canonical: no canonical tag is emitted on 404 pages (correct per Google's guidelines)
  • Analytics friendly: the page is a normal storefront page, so GA4, GTM, Matomo, and Hyva's analytics integrations all track it out of the box as page_location containing the missing URL

FAQ

Does this module override Magento's cms/noroute/index controller?

No. It uses Magento's standard layout update mechanism to replace the block under the content container. The controller itself is untouched.

Will the page still return HTTP 404?

Yes. The module does not change the response status — it only changes what is rendered inside the 404 response.

Can I use different headings for different languages?

Yes. All text fields are store-view scoped, so you can set English copy for your English store view, French copy for French, and so on. Values also run through Magento's translation layer if you prefer CSV translations.

Does it work with Hyva Checkout or Hyva Themes v2?

Yes. The Hyva template uses only Alpine.js and Tailwind utility classes, which both Hyva 1.x and the Hyva Themes v2 checkout support.

Does it work on Adobe Commerce Cloud?

Yes. No filesystem writes, no custom binaries, no cron — safe to deploy on ACC.

Can I customize the template further?

Yes. Override the template in your theme at app/design/frontend/Your/Theme/Panth_NotFoundPage/templates/hyva/notfound.phtml (or luma/notfound.phtml). All data is exposed on the block via public getters.

Does this conflict with other 404 or URL rewrite extensions?

No. Panth Not Found Page only touches the noroute layout handle — it does not intercept routing, redirects, or URL rewrites. It is compatible with Magento_UrlRewrite, redirect managers, and 301-redirect extensions.

Is a module dependency required?

Yes — mage2kishan/module-core (free, required for every Panth extension). Composer pulls it in automatically.

Support

Channel Contact
Email kishansavaliyakb@gmail.com
Website kishansavaliya.com
WhatsApp +91 84012 70422
GitHub Issues github.com/mage2sk/module-not-found-page/issues
Upwork (Top Rated Plus) Hire Kishan Savaliya
Upwork Agency Panth Infotech

Response time: 1-2 business days.

💼 Need Custom Magento Development?

Looking for custom 404 designs, Magento module development, Hyva theme work, store migrations, or performance optimization? Get a free quote in 24 hours:

Get a Free Quote

Hire on Upwork    Visit Agency    Visit Website

About Panth Infotech

Built and maintained by Kishan Savaliyakishansavaliya.com — a Top Rated Plus Magento developer on Upwork with 10+ years of eCommerce experience.

Panth Infotech is a Magento 2 development agency specializing in high-quality, security-focused extensions and themes for both Hyva and Luma storefronts. Our extension suite covers SEO, performance, checkout, product presentation, customer engagement, and store management — over 34 modules built to MEQP standards and tested across Magento 2.4.4 to 2.4.8.

Browse the full extension catalog on the Adobe Commerce Marketplace or Packagist.

Quick Links

Ready to give your Magento 2 store a 404 page that actually converts?
Get Started

SEO Keywords: magento 2 404 page, custom not found page, magento 2 no route page, magento 2 noroute, magento 2 error page, custom 404 magento, magento 2 page not found, hyva 404 page, luma 404 page, magento 2 404 customization, magento 2 noroute layout, magento cms noroute index, magento 2 404 with category links, magento 2 404 search bar, magento 2 404 contact info, magento 2 404 popular links, store view scoped 404, panth not found page, panth infotech, hire magento developer upwork, top rated plus magento freelancer, kishan savaliya magento, mage2kishan, mage2sk, magento 2.4.8 404, php 8.4 magento module, hyva alpine tailwind 404, luma knockout 404, magento 2 conversion 404, magento 2 bounce rate 404, magento 2 seo 404 status code, custom magento development india