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

Type:magento2-module

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

Statistics

Installs: 32

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.5 2026-06-18 09:36 UTC

This package is auto-updated.

Last update: 2026-06-18 09:37:03 UTC


README

Magento 2 Custom 404 Not Found Page Extension: Dynamic Categories, Search Bar, and Contact Info (Hyva + Luma)

Magento 2.4.4 - 2.4.8 PHP 8.1 - 8.4 Hyva + Luma Live Demo & Details Packagist Upwork Top Rated Plus Website

Replace the stock Magento 2 dead-end 404 with a branded page that gives shoppers a real next step. Dynamic category links pulled live from your catalog, a search bar, a configurable heading and subheading, an optional popular links section, and a contact email block. Every setting scopes per store view.

Product page: kishansavaliya.com/magento-2-not-found-page.html

Quick Answer

What is Panth Not Found Page? It is a Magento 2 extension that replaces the default no-route (404) page with a modern, branded design. Shoppers who land on a dead link see a clean page with a search bar, category shortcuts, and a way to contact you, instead of a generic "Whoops, our bad..." message.

What does it add to my store?

  • A custom 404 layout with a large gradient "404" code, configurable heading and subheading.
  • An integrated search bar that posts to the standard Magento catalog search endpoint.
  • Dynamic top-level category links pulled live from the active store's catalog (up to 6, menu-included, active categories only).
  • An optional popular links section that can be toggled per store view.
  • A contact email block so lost shoppers can reach you directly from the 404 page.

Which themes are supported? Both Hyva and Luma. The module ships one self-contained template with its own scoped CSS, so it renders correctly on both theme stacks without conflicts.

What does it need? Magento 2.4.4 to 2.4.8, PHP 8.1 to 8.4, and the free mage2kishan/module-core package.

Need Custom Magento 2 Development?

Get a free quote for your project in 24 hours for custom modules, Hyva themes, performance work, M1 to M2 migrations, and Adobe Commerce Cloud.

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

Who Is It For

  • Stores with large catalogs where outdated URLs and removed products regularly produce dead links. A useful 404 page reduces exits.
  • Multi-language and multi-brand stores that need different headings and contact details per store view.
  • Hyva storefronts that want a 404 page that matches the Hyva visual style without pulling in jQuery or RequireJS.
  • Merchants who want fast support contact on the 404 page, so shoppers do not leave without getting help.
  • Any Magento 2 store tired of the default "Whoops, our bad..." message that leaves shoppers with nowhere to go.

Key Features

Custom 404 Layout

  • Large gradient "404" code as the visual focal point, styled using CSS custom properties that inherit from your theme's primary color.
  • Configurable heading and subheading set from admin per store view, no template edits needed.
  • "Back to Homepage" and "Go Back" buttons always present so shoppers have an instant exit route.
  • Responsive design: on small screens the action buttons collapse to icon-only circles so the layout stays clean.
  • Self-contained scoped CSS that does not interfere with Luma's global styles or Hyva's Tailwind classes.

Integrated Search Bar

  • Inline search form on the 404 page so shoppers can search without navigating away.
  • Posts to Magento's standard catalogsearch/result/index endpoint.
  • Compatible with Elasticsearch, OpenSearch, and third-party search providers.
  • Toggle it on or off per store view from admin.

Dynamic Category Links

  • Pulls top-level categories live from the active store's root category.
  • Filters to is_active = 1 and include_in_menu = 1, so only real, navigable categories appear.
  • Shows up to 6 categories ordered by position.
  • Renders in the shopper's active store language automatically.
  • Controlled by the Show Popular Links toggle in admin.

Contact Email Block

  • Optional contact email shown at the bottom of the 404 page.
  • Rendered as a mailto: link so one tap opens a mail client on mobile.
  • Configurable per store view, so you can set a different email for each locale or brand.
  • Hidden entirely when Show Contact Information is turned off.

Store-View Scoped Settings

  • Every setting is store-view scoped so a multi-language store can show the right heading, subheading, and contact email for each locale.
  • Settings take effect immediately after a cache flush.

Zero Core Overrides

  • Uses Magento's standard cms_noroute_index layout handle.
  • No controller rewrites, no plugins on FrontController, no URL rewrite interference.
  • Compatible with maintenance mode, custom routers, redirect managers, 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 to 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)

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 from the product page.
  2. Extract it to app/code/Panth/NotFoundPage/ in your Magento installation.
  3. Make sure Panth_Core is installed too (required dependency).
  4. Run the commands above starting from bin/magento module:enable.

Verify Installation

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

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

Admin -> Stores -> Configuration -> Panth Extensions -> 404 Not Found Page

Configuration

Go to Stores -> Configuration -> Panth Extensions -> 404 Not Found Page.

Setting Group Default Description
Enable Custom 404 Page General Yes Master toggle. When off, Magento's default no-route page is used.
Heading Page Content Page Not Found The H1 heading shown at the top of the 404 layout.
Subheading Message Page Content Oops! The page you're looking for doesn't exist or has been moved. Supporting copy under the heading.
Show Search Bar Page Content Yes Render the inline search form.
Show Popular Links Page Content Yes Show dynamic top-level category links pulled from the active catalog.
Show Contact Information Page Content Yes Show the contact email block at the bottom of the page.
Contact Email Page Content support@example.com Email address shown as a mailto: link (visible only when Show Contact Information is on).

All settings are store-view scoped. Changes take effect after a cache flush.

How It Works

  1. A visitor requests a URL that Magento cannot match to any route or URL rewrite.
  2. Magento's front controller dispatches cms/noroute/index, its standard fallback handler.
  3. The module's layout update for cms_noroute_index replaces the default no-route block with Panth\NotFoundPage\Block\NotFound.
  4. The block reads all settings via Panth\NotFoundPage\Helper\Data, scoped to the current store view.
  5. The top-level categories are loaded from the category collection: filtered to parent_id = root, is_active = 1, include_in_menu = 1, ordered by position, limited to 6.
  6. The template renders the 404 layout with all enabled sections. The self-contained CSS is inlined in the template so it works on Hyva, Luma, and any other frontend theme.
  7. The response is returned with an HTTP 404 status code, unchanged from Magento's standard noroute behavior, so crawlers correctly mark the URL as missing.

FAQ

Does the page still return HTTP 404?

Yes. The module only changes what is rendered inside the 404 response. The status code is set by Magento's noroute handler and is not altered.

Will it work on Hyva themes?

Yes. The module ships a single self-contained template with scoped CSS. There are no jQuery or Knockout dependencies, so it renders cleanly on Hyva without conflicts.

Can I set different headings for English and French store views?

Yes. The Heading, Subheading, and Contact Email fields are all store-view scoped, so each locale can show its own copy.

What categories appear in the category links?

Only top-level categories (direct children of the store's root category) that are both active (is_active = 1) and included in navigation (include_in_menu = 1). Up to 6 are shown, ordered by catalog position.

Does it override Magento's cms/noroute/index controller?

No. It uses Magento's standard layout update mechanism to replace the rendered block. The controller, routing, and HTTP status code are untouched.

Can I hide the search bar or contact email?

Yes. Each section has its own toggle in Stores -> Configuration -> Panth Extensions -> 404 Not Found Page. You can turn off the search bar, category links, and contact info independently.

Does it work on Adobe Commerce Cloud?

Yes. No filesystem writes, no custom binaries, no frontend deploy overrides. It is safe to deploy on Adobe Commerce Cloud.

Can I override the template in my theme?

Yes. Create a template override at app/design/frontend/Your/Theme/Panth_NotFoundPage/templates/notfound.phtml. All data is available on the block via public getter methods.

Does it need Panth Core?

Yes. mage2kishan/module-core is a free, required dependency. Composer installs it for you automatically.

Support

Channel Contact
Product Page kishansavaliya.com/magento-2-not-found-page.html
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 Magento module development, Hyva theme work, store migrations, or performance tuning? Get a free quote in 24 hours:

Get a Free Quote

Hire on Upwork    Visit Agency    View Product Page

About Panth Infotech

Built and maintained by Kishan Savaliya (kishansavaliya.com), a Top Rated Plus Magento developer on Upwork with 10+ years of eCommerce experience.

Panth Infotech is a Magento 2 development agency that builds high quality, security focused extensions and themes for both Hyva and Luma storefronts. The extension suite covers SEO, performance, checkout, product presentation, customer engagement, and store management, with each module built to MEQP standards and tested across Magento 2.4.4 to 2.4.8.

Browse the full extension catalog on our Magento extensions page or on Packagist.

Quick Links

Resource Link
Product Page magento-2-not-found-page.html
Packagist mage2kishan/module-not-found-page
GitHub mage2sk/module-not-found-page
Website kishansavaliya.com
Free Quote kishansavaliya.com/get-quote
Upwork (Top Rated Plus) Hire Kishan Savaliya
Upwork Agency Panth Infotech
Email kishansavaliyakb@gmail.com
WhatsApp +91 84012 70422

Ready to give your Magento 2 store a 404 page that keeps shoppers on your site?
See Not Found Page

SEO Keywords: magento 2 404 page, custom not found page magento 2, 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, 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, magento 2 custom 404 extension, magento 2 404 dynamic categories, magento 2 branded error page, magento 2 convert 404 page, custom magento development