Creating a 404 Page Template using the power of Dynamic Content, can help you keep your site’s visitors happy even when they’re lost. You can display your recent posts, a search bar or anything you want.
- Go to Templates > Theme Builder > Single > Add New
- Select Single from the Type of Template dropdown, select 404 from the Post Type dropdown, name your template and click Create Template
- Design your own 404 Page Template or choose a pre-designed template
- After you’ve finished designing your 404 Page Template, click Publish
- Add Conditions to your 404 Page
Note: When naming your template, please do not begin the Template name with “404“. If the template name begins with 404, the resulting permalink will cause a redirect to the home page, when any non-existing page URL is visited. This happens due to the template library’s permalink. Since the library is private, if you hit any URL of the library, this will occur. If a user creates a 404 single template with the name”404 single”, for example, the permalink becomes http://mysiteurl.com/?elementor_library=404-single . Then, if a page like mysiteurl.com/404 is visited,the system will think it’s looking for that template file and redirect you to homepage. Just avoid naming the template with “404” in the beginning of the name, and this problem will not happen.