Are you experiencing a lot of 404 page not found errors in WordPress? 404 errors are not good for your site’s SEO and user experience. The good part is that they’re quite easy to fix with WordPress 404 redirect plugins. In this article, we will show you 6 best free 404 redirect plugins for WordPress.

您是否在WordPress中遇到很多404页面未找到错误? 404错误不利于您网站的SEO和用户体验。 好消息是,使用WordPress 404重定向插件很容易修复它们。 在本文中,我们将向您展示6个针对WordPress的最佳免费404重定向插件。

为什么您的WordPress网站显示404错误? (Why is Your WordPress Site Showing a 404 Error?)

Before you start fixing the 404 errors, it’s very important to understand why WordPress outputs a 404 error.

在开始修复404错误之前,了解WordPress为什么会输出404错误非常重要。

Often WordPress beginners approach us asking why is their WordPress site showing a 404 error for posts that exist. It is one of the common WordPress problems that beginners encounter.

WordPress初学者通常会联系我们,询问他们的WordPress网站为什么对现有帖子显示404错误。 这是初学者遇到的常见WordPress问题之一。

WordPress comes with support for SEO friendly URL structure. If you make changes to the URL structure, it will change the entire link structure of your website. Sometimes this is the reason why your site shows a 404 error even on existing posts.

WordPress附带了对SEO友好URL结构的支持。 如果更改URL结构,它将更改网站的整个链接结构。 有时这就是为什么您的网站即使在现有帖子上也显示404错误的原因。

Another reason for mysterious 404 errors for existing content is a missing or corrupt .htaccess file.

现有内容出现神秘404错误的另一个原因是.htaccess文件丢失或损坏。

If you installed a new plugin, created a new custom post type, or registered a custom taxonomy, then accessing the new URL may result into a 404 error because your .htaccess file is not updated.

如果您安装了新插件,创建了新的自定义帖子类型或注册了自定义分类法 ,则由于未更新.htaccess文件,因此访问新URL可能会导致404错误。

These are just few of the many possible reasons that may cause existing content to show 404 errors.

这些只是可能导致现有内容显示404错误的众多可能原因中的几个。

试试这个简单的技巧来修复WordPress中的404错误 (Try This Simple Tip to Fix 404 Errors in WordPress)

A lot of the times, you can fix the WordPress 404 errors by simply flushing your permalinks.

很多时候,您可以通过清除永久链接来解决WordPress 404错误。

You can do this by going to Settings » Permalinks in your WordPress admin area and click on the save changes button without making any changes.

您可以通过以下步骤执行此操作:转到WordPress管理区域中的“设置”»“永久链接” ,然后单击“保存更改”按钮,而不进行任何更改。

WordPress will automatically update your .htaccess file. You should check your website to confirm that 404 errors are gone.

WordPress将自动更新您的.htaccess文件。 您应该检查您的网站以确认404错误已消失。

If it doesn’t, then it’s possible that your .htaccess file isn’t writable, and you may have to manually update it. We have detailed instructions on the process in our guide on how to fix WordPress posts returning 404 error.

如果不是,则您的.htaccess文件可能不可写,您可能必须手动对其进行更新。 在我们的指南中,我们对如何处理返回404错误的WordPress帖子有详细的说明。

WordPress中404错误的不同方案 (Different Scenarios for 404 Errors in WordPress)

Aside from the reasons above, there are many other reasons why your WordPress site will show a 404 error. For example, if you have recently moved from WordPress to WordPress, or moved WordPress to new domain may cause the site to show 404 errors.

除了上述原因外,还有许多其他原因导致您的WordPress网站显示404错误。 例如,如果您最近从WordPress移至WordPress ,或将WordPress移至新域,则可能会导致该网站显示404错误。

In both scenarios, you need to fix your site’s permalink structure to resolve 404 errors.

在这两种情况下,您都需要修复站点的永久链接结构来解决404错误。

On the other hand, if you deleted a post or page, then it will output a 404 not found error page.

另一方面,如果您删除了帖子或页面,那么它将输出一个404 not found错误页面。

The best way to fix that is by redirecting users to new location. You should also inform search engines about the new location of those posts and pages by adding a 301 redirect header message.

解决此问题的最佳方法是将用户重定向到新位置。 您还应该通过添加301重定向标头消息,将这些帖子和页面的新位置通知搜索引擎。

This allows you to offer a great user experience and not lose your search engine rankings.

这使您可以提供出色的用户体验,而不会失去搜索引擎排名。

Having said that, let’s take a look at some of the most popular 404 redirect plugins for WordPress that can help you manage these issues.

话虽如此,让我们看一下一些最流行的WordPress 404重定向插件,它们可以帮助您管理这些问题。

1.重定向 (1. Redirection)

Redirection is a powerful WordPress plugin that allows you to easily set up redirects for your 404 pages. It comes with built-in option to track 404 errors that occurred on your website since you installed the plugin.

重定向是一个功能强大的WordPress插件,可让您轻松设置404页面的重定向。 它带有内置选项,可跟踪自您安装插件以来在您的网站上发生的404错误。

Redirection allows you to use powerful regex to match URL patterns and redirect them to appropriate pages. This is very useful if you have moved a site with a different URL structure to WordPress.

重定向允许您使用功能强大的正则表达式来匹配URL模式并将其重定向到适当的页面。 如果您将具有不同URL结构的网站移至WordPress,这将非常有用。

We have written a complete guide on how to track 404 pages and redirect them in WordPress using Redirection plugin.

我们已经编写了有关如何跟踪404页面并使用重定向插件在WordPress中重定向它们的完整指南。

While this plugin is great, the one thing you want to be careful of is the 404 logging setting. If you don’t set it up properly, then this plugin can make your database very heavy. Aside from that, this is the most powerful plugin available that’s 100% free.

尽管此插件很棒,但您要注意的一件事是404日志记录设置。 如果您没有正确设置,那么此插件会使您的数据库非常繁重。 除此之外,这是可用的最强大的插件,它是100%免费的。

2. SEO重定向插件 (2. SEO Redirection Plugin)

SEO Redirection Plugin is an easy to use plugin to track 404 errors and manage your redirects. It comes with a simple interface to manage your redirects.

SEO重定向插件是一个易于使用的插件,可以跟踪404错误并管理您的重定向。 它带有一个简单的界面来管理您的重定向。

It also keeps a log of 404 errors on your WordPress site, so that you can fix those errors.

它还会在WordPress网站上保留404错误的日志,以便您可以修复这些错误。

The plugin creates a new table in your WordPress database to store your redirects. It also keeps history of all redirects on your website.

该插件会在您的WordPress数据库中创建一个新表来存储您的重定向。 它还会将所有重定向的历史记录保留在您的网站上。

3.所有404重定向到首页 (3. All 404 Redirect to Homepage)

As the name suggests, this simple plugin redirects 404 errors to your WordPress site’s homepage.

顾名思义,这个简单的插件会将404错误重定向到WordPress网站的首页。

You can also do that by adding this code in your theme’s 404.php file. Place this code at the very beginning:

您也可以通过在主题的404.php文件中添加此代码来做到这一点。 将此代码放在最开始的位置:


<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".get_bloginfo('url'));
exit();
?>

For more information, see our tutorial on how to redirect your 404 page to the home page in WordPress.

有关更多信息,请参见有关如何将404页面重定向到WordPress主页的教程。

4. WordPress的410 (4. 410 for WordPress)

This plugin redirects your 404 error to a 410 page. Instead of redirecting users from 404 errors to some other page on your site. This plugin sends them to an error page called 410.

此插件会将您的404错误重定向到410页。 而不是将用户从404错误重定向到您网站上的其他页面。 该插件将它们发送到错误页面410。

The HTTP Specification defines the 410 response header to be used when a resource has been permanently removed. This is also helpful for search engines who are not instructed to ignore this URL and stop trying to access it.

HTTP规范定义了永久删除资源时要使用的410响应标头。 这对于没有指示忽略此URL并停止尝试访问它的搜索引擎也很有用。

The typical 301 redirect are supposed to be used when a content has moved to a new location. However, if you have removed a lot of content from your site, then adding a 301 redirect does not help your SEO very much.

当内容已移动到新位置时,应该使用典型的301重定向。 但是,如果您从站点中删除了很多内容,则添加301重定向对您的SEO并没有太大帮助。

410, on the other hand, stops search engines from continuously requesting that URL. It is also very helpful when you are trying to recover from a search engine penalty by removing duplicate or low quality content.

另一方面,410阻止搜索引擎连续请求该URL。 当您尝试通过删除重复的或低质量的内容从搜索引擎的罚款中恢复时,它也非常有帮助。

You can add a 410.php file in your WordPress theme and the plugin will start using it to show the error message to your human users.

您可以在WordPress主题中添加一个410.php文件,该插件将开始使用它向人类用户显示错误消息。

5. 404页 (5. 404page)

404 error pages in WordPress themes are usually pretty dull and not very helpful. There are some tips that you can use to improve the 404 template in WordPress.

WordPress主题中的404错误页面通常很枯燥,并且不是很有帮助。 您可以使用一些技巧来改进WordPress中的404模板。

However, these tips require you to use code and edit the template file.

但是,这些技巧要求您使用代码并编辑模板文件。

404page plugin allows you to simply select an existing page from your WordPress site and use it as 404 page.

404page插件可让您简单地从WordPress网站中选择一个现有页面并将其用作404页面。

6.四十四– 404 WordPress插件 (6. Forty Four – 404 Plugin for WordPress)

Forty Four plugin allows you to easily replace your theme’s default 404 page with a custom page. It comes with an easy user interface which allows you to edit the 404 page, use a full screen background image, and change its colors and text.

四十四插件可让您轻松地用自定义页面替换主题的默认404页面。 它带有一个简单的用户界面,使您可以编辑404页面,使用全屏背景图像以及更改其颜色和文本。

It also allows you to keep a log of 404 errors on your website. You can also setup 301 redirects for each URL resulting in 404 by editing them in the logs.

它还允许您在您的网站上保留404错误的日志。 您还可以通过在日志中进行编辑为每个URL设置301重定向,从而产生404。

We hope this article helped you find the best free 404 plugins for your WordPress site. You may also want to take a look at these WordPress 404 error page designs for inspiration.

我们希望本文能帮助您找到适用于WordPress网站的最佳免费404插件。 您可能还想看看这些WordPress 404错误页面设计,以获取启发。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在Twitter和Facebook上找到我们。

翻译自: https://www.wpbeginner/showcase/6-best-free-404-plugins-for-wordpress/

更多推荐

适用于WordPress的6个最佳免费404重定向插件