in

How to Create a Custom 404 Page in WordPress

custom 404s 2 633ebd6c38c75 sej

[ad_1]

When navigating a website, nothing is more frustrating than reaching a “page not found” 404 error screen.

This issue can cause users to click too quickly from your website.

To prevent this, make sure your internal page links are working properly.

But what if someone enters the wrong URL or the slug of one of the page links changes?

Unfortunately, it is inevitable that users will come across non-existent URLs.

However, you can take steps to help people return to the page they were looking for and avoid bounces from your website.

Why You Need a 404 Page

One way to prevent users from getting lost and create a positive user experience is to add a custom 404 page to your website.

This can give your site a bit of character and personality, perhaps humor, and links to help them get going.

Additionally, you can add links to other popular pages such as blogs, or link to a form if you want to report a bad connection that led to a 404 page.

Instead of custom error pages, you may want to create a 404 error instance link to your home page.

This can confuse users. Because users end up on the home page, they may not realize that the URL is wrong.

Redirecting users to your home page can also affect your SEO. This is because Google still sees this redirect as a soft 404 error.

according to google, the problem is to redirect all 404 links to the home page. A website owner should always focus on creating a user-friendly 404 page.

Setting up a custom 404 page

Depending on your WordPress theme, you have several options for custom 404 pages.

Using the plugin to create a custom 404 page should work well with the latest themes.

Classic WordPress Themes and Block Editor Themes

Option 1: Use your theme’s 404.php

2020 theme page 404WordPress Dashboard Screenshot, September 2022

If you’re familiar with working with PHP files for your website, many themes already have templates for 404 pages.

  • step 1: go to exterior > theme file editor in your WordPress dashboard.
  • step 2: Select your theme in the dropdown menu and locate the 404.php file.
  • step 3: Ideally, you should copy 404.php to your child theme so you don’t lose your work on theme updates.
  • step 4: Personalize the text, add images and other elements to make it unique.
  • step 5:[ファイルを更新]Click to save your changes.

Option 2: Copy the 404.php file

Some themes may not include a 404.php file. In this case you can use the 404.php file to copy his 404.php file from another theme such as Twenty-Twenty.

This may require some tweaking to suit your theme, but you can customize the 404.php file and store it inside your theme folder.

  • step 1: Find the 404 page theme you want to use.
  • step 2: go to the theme folder for that theme and make a copy of the 404.php file.
  • step 3: Move the copy to the theme folder of the theme or child theme you want to use on your site. Make sure the name is 404.php.
  • step Four: Look at the 404 page on the frontend of your site to make sure everything looks as expected.
  • step Five: using the same steps as above, modify the file in the theme file editor, file update Save your changes.

Option 3: Copy the Index.php File

If your theme doesn’t include a 404.php file, this is another way to create one.

  • step 1: You need to duplicate the index.php file.
  • step 2: rename the cloned 404.php
  • step 3: Remove the code used to display the post.
  • step Four: Personalize the text, add images and other elements to make it unique.
  • step Five: hit file update Save your changes.

Some knowledge of PHP and HTML is required, but this option is a bit cleaner than using a 404 page from another theme, as it means that the 404 page will match your current theme.

Create a 404 page within Page Builder

If you’re using a WordPress page builder like Elementor, Divi, Beaver Builder or Oxygen, you have the option to add a 404 page within the builder’s interface.

See your preferred builder’s documentation for details on where you can adjust settings to redirect the wrong URL to your custom 404 page.

Use the 404 page WordPress plugin

An easy way to add a custom 404 page to any WordPress site is with the WordPress 404 Pages plugin.

404 page pluginWordPress.org screenshot, September 2022

These plugins allow you to design custom 404 pages and track 404 errors. Common 404 page plugins include:

404page – Smart Custom 404 Error Page – This is a very simple 404 page plugin that is free to use. Create a new WordPress page that will be your custom 404 page.To set this as a custom 404 page, go to[外観]Go to[404 エラー ページ]and select the page you created, it will be the default 404 page.

SeedProd – This WordPress plugin allows you to create beautiful, lightweight and customized 404 page templates that you can use on your website.

SeedProd pluginWordPress.org screenshot, September 2022

Colorlib 404 Customizer – This free WordPress plugin uses Live Customizer to easily create custom 404 pages that match the look of your site.

The settings are displayed under your WordPress dashboard. exterior > customization You can further customize your 404 page by adding CSS.

Colorlib 404 customizer pluginWordPress.org screenshot, September 2022

Custom 404 Pro – With this WordPress plugin, you can use the[ページ]You can create a custom 404 page for your section. Additionally, you can track instances of URLs entered to display 404 pages, so you can monitor broken links.

Custom 404 Pro pluginWordPress.org screenshot, September 2022

Site-wide edit

Creating a custom 404 page has never been easier if you’re using the WordPress Full Site Editing theme. Follow these steps to create a custom 404 page for your WordPress website.

FSE 2022 theme templateWordPress Dashboard Screenshot, September 2022

When someone tries to go to a page that doesn’t exist, they are automatically redirected.

  • step 1: in your WordPress dashboard, exterior, Then go to “Editor”.
  • step 2:[エディタ]and, template.
  • step 3: select the 404 template.
  • step Four: create a custom 404 page using the block editor, keep.
  • step Five: hit keep Click again to save the template.
FSE save 404 templateWordPress Dashboard Screenshot, September 2022

WordPress custom 404 page

A broken link or wrong URL doesn’t have to be a disaster.

You can keep users engaged by making your 404 error page fun and providing links to your home page and other interesting pages on your website.

Creating a custom 404 page in WordPress has never been easier and should not be overlooked as it improves the user experience.

This page also tracks when visitors find your 404 page, so you can fix the link or redirect the page if necessary.

If you want to see a creative 404 page, go to your favorite site, enter the URL, and append a page you know doesn’t exist.

You should get some great ideas for your own 404 page!

Other resources:


Featured Image: apghedia/Shutterstock



[ad_2]

Source link

What do you think?

Leave a Reply

GIPHY App Key not set. Please check settings

    58de twittercard 221010 dns main image

    Lack of security in hidden DNS resolvers leaves website hijacking risk pervasive

    architectural drawing adobe stock freedomz

    Bridging the UX and build environment