With 100,000+ active installations the 404page plugin is the most used plugin to create a customized 404 error page in WordPress.
Bringing visitors to your website takes time and effort. Every visitor is important. The default 404 error page of most themes do not provide any information on what to find on your site. A first tme visitor, who does not know you, is left in a dead end and leaves your website. Set up a helpful custom 404 error page to keep him on your site.
This handy plugin allows you to easily create your own 404 error page without any effort and it works with almost every theme.
Create your custom 404 error page just like any other page using the WordPress Page Editor. Then go to ‘Appearance’ -> ‘404 Error Page’ and select the created page as your custom 404 error page. That’s it!
See it in action (no registration needed)
kindly powered by TasteWP
Why use this plugin?
Different from other similar plugins the 404page plugin does not create redirects. That’s quite important because a correct code 404 is delivered which tells search engines that the page does not exist and has to be removed from the index.
Different from other similar plugins the 404page plugin does not create additional server requests.
The only requirement for this plugin is that you change the Permalink Structure in ‘Settings’ -> ‘Permalinks’ to anything else but ‘Plain’. This also activates the WordPress 404 error handling.
Docs & Support
A brief Introduction to the free WordPress Plugin 404page
A quick Overview over the Advanced Settings
“Force 404 error after loading page” explained
“Disable URL Autocorrecton Guessing” explained
“Send HTTP Status Code 410 for trashed objects” explained
“Compatibility Mode” explained
Block & Shortcode
The Plugin offers a block “URL causing 404 error” for the block-based editor to show the URL that caused the error. The block offers three display options:
- “Page” to show the page including path ( e.g. does/not/exist )
- “Domain Path” to show the URL without protocol and parameters ( e.g. example.com/does/not/exist )
- “Full” to show the complete URL ( e.g. https://example.com/does/not/exist?p=1 )
The Plugin offers a shortcode “pp_404_url” for the classic editor to show the URL that caused the error. There are three possible options:
- [pp_404_url page] to show the page including path ( e.g. does/not/exist )
- [pp_404_url domainpath] to show the URL without protocol and parameters ( e.g. example.com/does/not/exist )
- [pp_404_url] or [pp_404_url full] to show the complete URL ( e.g. https://example.com/does/not/exist?p=1 )
Do you like this plugin?
I spend some of my precious free time developing and maintaining my free WordPress plugins. You don’t need to make a donation. No money, no beer, no coffee. If you like this plugin then please do me a favor and give it a good rating. Thanks.
Plugin Privacy Information
- This plugin does not set cookies
- This plugin does not collect or store any data
- This plugin does not send any data to external servers
Peters’ Plugins Privacy Information Page
This plugin is compatible with ClassicPress.
More plugins from Peter
Take a look at my other plugins
The 404page plugin was sucessfully tested by the author with the following themes
- Customizr (Read more about Customizr Compatibility Mode)
- Twenty Ten
- Twenty Eleven
- Twenty Twelve
- Twenty Thirteen
- Twenty Fourteen
- Twenty Fifteen
- Twenty Sixteen
- Twenty Seventeen
- Twenty Nineteen
- Twenty Twenty
- Zerif Lite
The 404page plugin was sucessfully tested by the author with the following starter themes
The 404page plugin was sucessfully tested by the author with the following plugins
- DW Question & Answer
- Page Builder by SiteOrigin
- User Submitted Posts
- WP Super Cache (Read more about WP Super Cache Compatibility)
- WPML WordPress Multilingual Plugin (officially approved by WPML team)
The plugin adds an action hook 404page_after_404 which you can use to add extra functionality. The exact position the action occurs after an 404 error is detected depends on the Operating Method. Your function must not generate any output. There are no parameters.
If the 404page plugin is installed and activated it defines the PHP constant PP_404. Check existence of it to detect the 404page plugin.
The Plugin provides the following functions:
- pp_404_is_active() to check if there is a custom 404 page selected and the selected page exists
- pp_404_get_page_id() to get the ID of the 404 page
- pp_404_get_all_page_ids() to get an array of page IDs in all languages
- pp_404_get_the_url( $type ) to get the URL that caused the 404 error
- Parameter $type string Optional
- “page” to get the page including path ( e.g. does/not/exist )
- “domainpath” to get the URL without protocol and parameters ( e.g. example.com/does/not/exist )
- “full” (default) to get the complete URL ( e.g. https://example.com/does/not/exist?p=1 )
If you are a theme developer you can add native support for the 404page plugin to your theme for full control. Read more.
This plugin provides 1 block.
- URL causing 404 error
Will it work with the theme I’m using?
This plugin is designed to work with as many themes as possible. It uses the WordPress Template System to detect and handle 404 errors. If your theme makes use of this Template System this plugin will work properly. If it does not the plugin offers a so called Compatibility Mode, which uses its completely own method to detect and handle 404 errors. If this plugin does not work properly, try to activate Compatibility Mode.
Are 404 errors redirected?
No, there is no redirection! The chosen page is delivered as a ‘real’ 404 error page. This results in a HTTP 404 code and not in 301 or 302, which is important for Search Engines to tell them, that the page does not exist and should be deleted from the index.
Is it possible to add custom CSS to the 404 page?
The 404page plugin adds a CSS class
<body>tag which can be used for extra styling.
Where can I get help?
Please use the Support Forum.
Contributors & Developers
“Smart Custom 404 error page [404page]” adalah perisian sumber terbuka. Orang-orang berikut telah menyumbang kepada pemalam ini.Penyumbang
“Smart Custom 404 error page [404page]” telah diterjemahkan ke dalam 18 penempatan. Terima kasih kepada para penterjemah untuk terjemahan mereka.
Translate “Smart Custom 404 error page [404page]” into your language.
Berminat dalam pembangunan?
Layari kod, periksa repositori SVN, atau langgani log pembangunan dengan RSS.
- bugfix for WP 6.1
- also add class error404 to body tag if page is called directly
- plugin renamed
- Block added
- Shortcode added
- Function pp_404_get_the_url() added
- just cosmetics
- Plugin Foundation updated to PPF08
- new option to always send an 410 instead of an 404
- Plugin Foundation updated to PPF07
- Plugin Foundation updated to PPF06
- minor UI adjustments
- bug fix for Flamingo (see topic) plus potentially other plugins (thanks to garfiedo for supporting me to find the reason)
- fix for Polylang (see topic)
- changes to the notification for hopefully better compatibility
- Plugin Foundation swtiched to PPF04
- if W3 Total Cache is installed and caching is active URLs that result in an 404 error are automatically excluded from caching
- if WP Super Cache is installed and caching is active URLs that result in an 404 error are automatically excluded from caching
- urgent bug fix for PPF03
- Plugin Foundation updated to PPF03, no functional changes
- exclude 404 page from XML sitemap generated by Jetpack
- from now on it is not only detected if Yoast SEO Plugin is active, but also if the sitemap feature is activated
- now uses Plugin Foundation PPF02 for plugin compatibility
- introduces two new functions for developers pp_404_get_page_id() and pp_404_get_all_page_ids()
- bugfix for Yoast SEO XML Sitemap (see topic)
- added a note to settings page if Yoast SEO is active
- bugfix for WPML
- bugfix for REST API call (see here)
- fix for PHP 7.1 – __construct() access level in subclass – this is an PHP error that was fixed in PHP 7.2, but I’ve changed my code to also work with PHP 7.1
- mostly rewritten based on my own newly created Plugin Foundation
- some more security improvements
- security vulnerability in AJAX call fixed (thanks to Julio Potier for pointing me to this)
- fix for compatibility with iThemes Sync (ticket)
- just another small change to prevent from potential problems with version 10
- error fixed (ticket)
- workaround for WordPress Permalink bug #46000
- code improvement
- performance tuning
- Gutenberg note added
- fixed compatibility issue with latest WPML version
- code improvement
- UI improvements
- corrected wrong image path
- added video links to admin page
- code improvements
- exclude 404 page from XML sitemap generated by Yoast SEO
- further UI-improvements
- show an indicator if the currently edited page is a 404 error page
- minor code- & UI-improvements
- bugfix for bbPress (see topic)
- support for right-to-left-languages added
- faulty display in WP 4.9 fixed
- new feature to send an HTTP 410 error for deleted objects
- bugfix for Polylang (see topic)
- bugfix for CLI (see topic)
- add debug class to body tag
- also add body classes for Customizr theme
- do not add error404 class if already exists
- further redesign admin interface
- new feature to force 404 error after loading page
- new feature to disable URL autocorrection guessing
- finally removed Polylang stuff disabled in 2.4
- redesigned admin interface
- code improvement
- hide 404 page from search results on front end (if WPML is active, all languages are hidden)
- do not fire a 404 in Compatibility Mode if the DW Question & Answer plugin by DesignWall is active and a question has no answers
- ensure that all core files are loaded properly (see topic)
- Polylang plugin does no longer require Compatibility Mode (see topic)
- hide all translations if WPML is installed and “Hide 404 page” is active (thanks to the WPML guys for pointing me at this)
- post status fix (see topic)
- Enfold theme issue fix (thanks to the guys at Kriesi.at for supporting me)
- a few minor bugfixes solve some problems with page templates in certain combinations
- automatic switch to Compatibility Mode for several plugins removed
- enhanced support for WPML and Polylang
- remove the 404 page from search results (for all languages if WPML or Polylang is used)
- remove the 404 page from sitemap or other page lists (for all languages if WPML or Polylang is used)
- bugfix for author archives
- confusing admin message removed
- introduction of selectable Operating Methods
- several changes to Compatibility Mode for improved WPML and bbPress compatibility plus compatibility with Page Builder by SiteOrigin
- Polylang compatibility
- automatic switch to Compatibility Mode if WPML, bbPress, Polylang or Page Builder by SiteOrigin is detected
- completely new Customizr Compatibility Mode (automatically enabled if Customizr is detected)
- firing an 404 error in case of directly accessing the 404 error page can now be deactivated
- WP Super Cache support
- option to hide the 404 error page from the Pages list
- 404 error test
- plugin expandable by action
- delete all settings on uninstall
- WPML compatibility
- bbPress compatibility
- Customizr compatibility
- directly accessing the 404 error page now throws an 404 error
error404added to the classes that are assigned to the body HTML element
- the settings menu was moved from ‘Settings’ to ‘Appearance’
- translation files removed, using GlotPress exclusively
- Read more
- edit the 404 page directly from settings page
- Portuguese translation
- technical improvement (rewritten as class)
- Spanish translation
- Serbo-Croatian translation
- Multilingual support added
- German translation
- Initial Release