Magento 2 Custom 404 Not Found Page Extension: Dynamic Categories, Search Bar, and Contact Info (Hyva + Luma)
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
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.
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.
|
Top Rated Plus on Upwork 100% Job Success • 10+ Years Magento Experience Adobe Certified • Hyva Specialist |
Magento Development Team Custom Modules • Theme Design • Migrations Performance • SEO • Adobe Commerce Cloud |
Visit our website: kishansavaliya.com | Get a quote: kishansavaliya.com/get-quote
- Who Is It For
- Key Features
- Compatibility
- Installation
- Configuration
- How It Works
- FAQ
- Support
- About Panth Infotech
- Quick Links
- 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.
- 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.
- Inline search form on the 404 page so shoppers can search without navigating away.
- Posts to Magento's standard
catalogsearch/result/indexendpoint. - Compatible with Elasticsearch, OpenSearch, and third-party search providers.
- Toggle it on or off per store view from admin.
- Pulls top-level categories live from the active store's root category.
- Filters to
is_active = 1andinclude_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.
- 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.
- 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.
- Uses Magento's standard
cms_noroute_indexlayout handle. - No controller rewrites, no plugins on
FrontController, no URL rewrite interference. - Compatible with maintenance mode, custom routers, redirect managers, and security modules.
| 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) |
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- Download the latest release from Packagist or from the product page.
- Extract it to
app/code/Panth/NotFoundPage/in your Magento installation. - Make sure
Panth_Coreis installed too (required dependency). - Run the commands above starting from
bin/magento module:enable.
bin/magento module:status Panth_NotFoundPage
# Expected: Module is enabledAfter 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
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.
- A visitor requests a URL that Magento cannot match to any route or URL rewrite.
- Magento's front controller dispatches
cms/noroute/index, its standard fallback handler. - The module's layout update for
cms_noroute_indexreplaces the default no-route block withPanth\NotFoundPage\Block\NotFound. - The block reads all settings via
Panth\NotFoundPage\Helper\Data, scoped to the current store view. - 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. - 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 ot CDCA her frontend theme.
- 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.
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.
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.
Yes. The Heading, Subheading, and Contact Email fields are all store-view scoped, so each locale can show its own copy.
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.
No. It uses Magento's standard layout update mechanism to replace the rendered block. The controller, routing, and HTTP status code are untouched.
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.
Yes. No filesystem writes, no custom binaries, no frontend deploy overrides. It is safe to deploy on Adobe Commerce Cloud.
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.
Yes. mage2kishan/module-core is a free, required dependency. Composer installs it for you automatically.
| Channel | Contact |
|---|---|
| Product Page | kishansavaliya.com/magento-2-not-found-page.html |
| kishansavaliyakb@gmail.com | |
| Website | kishansavaliya.com |
| +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.
Looking for custom Magento module development, Hyva theme work, store migrations, or performance tuning? Get a free quote in 24 hours:
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.
| 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 |
| kishansavaliyakb@gmail.com | |
| +91 84012 70422 |
Ready to give your Magento 2 store a 404 page that keeps shoppers on your site?
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