I recently created a website at www.volatileinterface.com, using WordPress. I am using the cyanotype theme and I wanted to create a custom 404 error page for when a webpage could not be found. I edited 404.php to look like this.


get_header(); ?>

    <div id="primary" class="content-area">

        <div id="content" class="site-content" role="main">

            <div class="page-content">

        <img src="/deadend.jpg"></img>
                <p><?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'twentyfourteen' ); ?></p>
                <?php get_search_form(); ?>

            </div><!-- .page-content -->

       </div><!-- #content -->

   </div><!-- #primary -->


get_sidebar( 'content' );



When I go to a page that doesn't exist such as http://www.volatileinterface.com/index.php/jargon the website and 404 error page appear fine. However, when I go to a page like this http://www.volatileinterface.com/jargon that does not have index.php in its address the broswer just goes to the default 404 error page. How do I always make the browser go to my custom 404 error page?

2 Answers 2


WordPress doesn't receive those requests, so the server 404 displays. If you want WordPress to handle all 404s, use mod_rewrite Pretty Permalinks rather than PATHINFO permalinks. The requirements are detailed in Using Permalinks.


set a permalink structure on settings> permalinks . WordPress needs to create the .htaccess file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.