wordpress404_在WordPress中管理断开的链接和404

wordpress404

Broken links create a horrible user experience. Who wants to click on a link, only to find that it goes nowhere? That the awesome article you were all set to read doesn’t actually exist?

断开的链接会带来可怕的用户体验。 谁想要单击一个链接,却发现它无处可去? 您准备阅读的真棒文章实际上不存在吗?

Unfortunately, the natural decay of links (also often referred to as link rot) occurs all too often. Link rot happens for any number of reasons: domains expire, websites are abandoned, incorrect URLs are used, and websites are restructured using new URLs. This happens to both outbound and inbound links. And, even though best practice dictates the use of 301 redirects in the case of website restructures, not everyone sets them up. Or, if they do – they’re often set up incorrectly.

不幸的是,链接的自然衰减(通常也称为链接腐烂 )经常发生。 链接腐烂的发生有多种原因:域名过期,网站被废弃,URL使用不正确以及网站使用新URL进行重组。 出站链接和入站链接都会发生这种情况。 而且,即使最佳实践要求在网站重组的情况下使用301重定向,但并非所有人都进行了设置。 或者,如果这样做,通常会设置错误。

This shouldn’t stop you from linking to other sites. Linking to other websites is an important component of what the web is all about. Some people tend to think that linking out to third party websites will cause visitors to leave their site, reducing their visitor stats, but linking out is exactly what the web was designed for. You shouldn’t be scared of it, rather, you should embrace the value that enriching your content offers. Providing your visitors with related content or a deeper dive on a given topic is a far better user experience than dumping users at a dead end. This is just my opinion, I know there are different schools of thought when it comes to the topic of outbound links.

这不应阻止您链接到其他站点。 链接到其他网站是网络的重要组成部分。 有些人倾向于认为,链接到第三方网站将导致访问者离开他们的网站,从而减少访问者的统计信息,但是链接出境正是网络设计的目的。 您不应该对此感到恐惧,而应该拥抱丰富内容所提供的价值。 为您的访问者提供相关内容或对特定主题进行更深入的研究,比在死胡同中放弃用户要好得多。 这只是我的观点,我知道关于出站链接的话题有不同的思想流派。

So, if you can’t control other people’s websites, and you shouldn’t stop linking out to other websites, then what can you do to make sure you’re not sending people to non-existent pages? Well, it’s pretty simple really: you can control your own site by performing regular link maintenance and keeping your outbound links in check.

因此,如果您无法控制其他人的网站,并且不应该停止链接到其他网站,那么该怎么做以确保您不会将其他人发送到不存在的页面? 好吧,这真的很简单:您可以通过执行常规的链接维护并检查出站链接来控制自己的网站。

The management of broken links is an integral part of good WordPress maintenance. And, thanks to a number of plugins and tools at our disposal, it’s becoming increasingly easy to automate the process of link maintenance these days. So, without further ado, let’s take a look at some of these tools.

断开链接的管理是良好WordPress维护的组成部分。 而且,由于有许多可供使用的插件和工具,如今,自动进行链接维护过程变得越来越容易。 因此,事不宜迟,让我们看一下其中的一些工具。

As the name suggests, this plugin has been designed to check all the content on your WordPress website (from your posts and pages, as well as comments) for broken links and missing images. When you first install this plugin on your site, it will begin by checking all of your links. Depending on the size of your site this can take a while. This plugin has lots of configuration options, you can set up automatic notifications either via your WordPress dashboard, or by email, and can even set it to display broken links differently. It can also prevent search engines from following any broken links that might exist on your website, which is handy when you have a lot of user generated content.

顾名思义,此插件旨在检查WordPress网站上的所有内容(来自您的帖子和页面以及评论),以查找断开的链接和丢失的图像。 当您首次在网站上安装此插件时,它将首先检查所有链接。 根据您网站的大小,这可能需要一段时间。 该插件具有许多配置选项,您可以通过WordPress仪表板或通过电子邮件设置自动通知,甚至可以将其设置为以不同方式显示断开的链接。 它还可以防止搜索引擎跟踪您网站上可能存在的任何损坏的链接,当您拥有大量用户生成的内容时,这非常方便。

Once you have this plugin installed and configured, you can manage any broken links from within the plugin interface. The ‘Broken Links’ tab in your WordPress dashboard will contain a list of all problem links. Each link will then have four different options available:

一旦安装并配置了此插件,就可以从插件界面中管理任何断开的链接。 WordPress信息中心中的“损坏的链接”标签将包含所有问题链接的列表。 每个链接将具有四个可用选项:

  • Edit URL: which lets you change the URL of the broken link, across all instances included throughout your website. This is quite a handy option for correcting issues like typos or small mistakes (like using .com or .com.au).

    编辑网址 :您可以在整个网站中包含的所有实例中更改断开链接的网址。 对于纠正诸如错别字或小错误(例如使用.com或.com.au)之类的问题,这是一个非常方便的选择。

  • Unlink: this allows you to leave the URL on your website page, but to remove the hyperlink (so your website users can’t actually click on the link).

    取消链接 :这使您可以将URL保留在网站页面上,但是可以删除超链接(因此,您的网站用户实际上无法单击链接)。

  • Not Broken: this allows you to manually change the classification of a link. It is quite helpful if you know that a link isn’t actually broken. For instance, if a website is temporary down for maintenance or there is a glitch in the system.

    不中断 :您可以手动更改链接的分类。 如果您知道链接实际上没有断开,这将非常有帮助。 例如,如果网站因维护而暂时关闭或系统出现故障。

  • Dismiss: this removes the link from the ‘Broken Links’ tab, and checks it as normal. It can be used if you want to confirm that a link is broken, but not do anything about it for the time being.

    关闭 :从“断开的链接”标签中删除该链接,并进行正常检查。 如果您要确认链接已断开,但暂时不执行任何操作,则可以使用它。

With over 400,000 active downloads (and more than 3.2 million in total), and a 4.1 star rating, this is the most popular broken link check plugin on the market.

这是目前市场上最受欢迎的断开链接检查插件,拥有超过40万次有效下载(总计超过320万次),并获得4.1星评级。

A quick word of warning on this plugin though, according to some users it can cause high load on the server side of things. In fact, WP Engine has it on their list of disallowed plugins because it requires an high number of HTTP requests. Make sure you’re monitoring your server resources if you check this one out.

不过,对此插件一言以蔽之,根据某些用户的说法,它可能会导致服务器端的高负载。 实际上,WP Engine在不允许的插件列表中列出了它,因为它需要大量的HTTP请求。 如果您检查这一点,请确保您正在监视服务器资源。

Next up on the list, we have LinkPatrol, a plugin that cleans up your outgoing link profile. Created by the team over at Search Engine Journal, LinkPatrol works on the basis of a simple, three-step process:

接下来是列表,我们有LinkPatrol,这是一个用于清理您的传出链接配置文件的插件。 由小组在“搜索引擎期刊”上创建,LinkPatrol的工作基于一个简单的三步过程:

  1. Scan: the plugin will scan all the content on your website. This may take a few seconds to complete, but once it’s done, you won’t have to do it again. The plugin will automatically scan any new posts and pages as they are created.

    扫描 :插件将扫描您网站上的所有内容。 这可能需要花费几秒钟来完成,但是一旦完成,您就不必再做一次。 该插件将在创建新帖子和页面时自动对其进行扫描。

  2. Review: the plugin then gives a report on all your links, enabling you to sort by the domain, the author, and even the anchor text that you have used. You can even export your report as a CSV file.

    审核 :该插件随后会提供所有链接的报告,使您能够按域,作者甚至使用的锚文本进行排序。 您甚至可以将报告导出为CSV文件。

  3. Take Action: based on the information included in your comprehensive report, you can then determine what it is that you need to do quickly and easily. For instance, you can strip or nofollow all links from particular domains. The options really are quite immense.

    采取行动 :根据综合报告中包含的信息,您可以确定快速而轻松地需要执行的操作。 例如,您可以删除或取消关注特定域中的所有链接。 选项确实是非常巨大的。

LinkPatrol is not a free option; there are three different price points:

LinkPatrol不是免费的选择; 有三个不同的价位:

  • Blogger: $50 one-off fee, which allows you to use the plugin on one site, and comes with one year of support and updates

    Blogger:一次性费用$ 50,可让您在一个网站上使用该插件,并提供一年的支持和更新
  • Consultant: $100 one-off fee, which allows you to use the plugin on five sites, and comes with one year of support and updates

    顾问:一次性费用$ 100,可让您在五个站点上使用该插件,并提供一年的支持和更新
  • Agency: $200 one-off fee, which allows you to use the plugin on 20 sites, and comes with one year of support and updates

    代理商:一次性费用$ 200,可让您在20个网站上使用该插件,并提供一年的支持和更新
LinkPatrol WordPress Plugin

While the two plugins above are great options when it comes to checking all the links on your WordPress website, if you don’t want the overhead of installing additional plugins, there are plenty of standalone options. So, here are a few link checking tools, that you can use on any site.

虽然上面的两个插件是检查WordPress网站上所有链接的不错选择,但如果您不想安装其他插件的开销,则有很多独立的选择。 因此,这里有一些链接检查工具,可以在任何站点上使用。

Google Search Console(以前称为Google网站管理员工具) (Google Search Console (formerly Google Webmaster Tools))

A good tool for checking the broken links on your website is one that’s provided by Google itself: Google Search Console. Google Search Console is the new name for what you may already know as Google Webmaster Tools. Google Search Console is quite easy to use, all you need to do is log into your Google account and go here. On the homepage, you’ll be greeted with the dashboard for your website or websites. Underneath the ‘Current Status’ heading, you’ll see a section called ‘Crawl Errors’. If you have any broken links that Google detects when it crawls your website, they’ll be displayed here, making it quick and easy to pinpoint (and then fix) most of your broken links.

Google本身提供了一种检查网站上断开链接的好工具:Google Search Console。 Google Search Console是您可能已经知道的Google网站站长工具的新名称。 Google Search Console非常易于使用,您需要做的就是登录您的Google帐户并转到此处 。 在首页上,您会看到一个或多个网站的信息中心。 在“当前状态”标题下,您会看到一个名为“抓取错误”的部分。 如果您在Google抓取您的网站时发现任何断开的链接,它们会显示在此处,使您可以快速,轻松地找到(然后修复)大多数断开的链接。

Google Search Console

尖叫青蛙SEO蜘蛛 (Screaming Frog SEO Spider)

Screaming Frog SEO Spider (commonly just referred to as Screaming Frog) is a popular desktop spider/web crawler. Since it’s a desktop application, you’ll need to download the program directly onto your computer. It will then crawl all aspects of your website. It will then analyse it from both a user and an SEO perspective (as its name suggests). It enables you to quickly and easily crawl, analyse and audit the content of your website, all from an SEO perspective. It presents detailed reports, which you can slice and dice in any manner that you like. And of course, it includes extensive details on broken links.

尖叫青蛙SEO蜘蛛(通常简称为“尖叫青蛙”)是一种流行的台式蜘蛛/网络爬虫。 由于它是桌面应用程序,因此您需要将程序直接下载到计算机上。 然后,它将抓取您网站的所有方面。 然后,它将从用户和SEO角度对其进行分析(顾名思义)。 它使您能够从SEO角度快速轻松地爬网,分析和审核您的网站内容。 它提供了详细的报告,您可以按照自己喜欢的任何方式对其进行切片和切块。 当然,它包含断开链接的大量详细信息。

There are different versions available of Screaming Frog, available for Windows, OS X and Linux:

Screaming Frog有不同版本,可用于Windows,OS X和Linux:

  • Standard/Lite: which is completely free to download and use. However, it does have some limitations. It can only crawl 500 URLs in any one project, and you don’t have full access to the configuration options. For instance, you can’t save your crawls.

    Standard / Lite:完全免费下载和使用。 但是,它确实有一些限制。 它只能在任何一个项目中抓取500个URL,并且您没有对配置选项的完全访问权限。 例如,您无法保存抓取。
  • Individual Licence: for the cost of £99 per year, you can up the ante, gaining access to all aspects of the configuration and getting rid of the 500 URL crawl limit. As a long time customer, it’s a great tool, one that I highly recommend.

    个人许可证:您每年只需支付99英镑的费用,您就可以提高底注,访问配置的所有方面并摆脱500 URL爬网限制。 作为长期客户,这是一个很棒的工具,我强烈建议您使用。

Screaming Frog is used regularly as a broken link checker, offering detailed user instructions on how to use it for this purpose alone.

Screaming Frog通常用作断开的链接检查器,为用户提供有关如何单独用于此目的的详细用户说明

Screaming Frog

There are also a few competitors to the popular Screaming Frog, a few of them web-based applications, all with their own pros and cons. The web apps do cost a little bit more, but they’re worth it if you need some grunt to tackle larger projects.

流行的Screaming Frog也有一些竞争对手,其中一些基于Web的应用程序各有优缺点。 Web应用程序确实要花费更多,但是如果您需要一些精力来处理较大的项目,则值得这样做。

There are also several desktop tools that specialize in just link checking, as opposed to the multi-purpose SEO crawlers listed above. I’m sure there are more, but these seem to be the most popular ones I’ve come across by far:

与上面列出的多功能SEO搜寻器相反,还有几种专门用于链接检查的桌面工具。 我敢肯定还有更多,但是这些似乎是我到目前为止遇到的最受欢迎的:

链接检查器 (LinkChecker)

LinkChecker is open source project hosted on GitHub that deserves a mention. It’s a free website validator that supports recursive site crawling, cookies, restriction of link checking and regular expression filters for URLs. Given it’s technical nature, if you are a WordPress beginner, then this might not be the right tool for you. For advanced users or developers, it’s definitely worth checking out.

LinkChecker是托管在GitHub上的开源项目,值得一提。 这是一个免费的网站验证器,支持递归站点爬网,Cookie,链接检查限制和URL的正则表达式过滤器。 考虑到它的技术性质,如果您是WordPress初学者,那么这可能不是适合您的工具。 对于高级用户或开发人员,绝对值得一试。

LinkChecker

404s –不得已 (404s – The Last Resort)

With all these tools on the market, many of them free to download and use, there really are no excuses for broken links on your website. But, as I mentioned earlier, you can’t stop what people type into the address bar, or what people use as links to your site. Plus, we all make mistakes, right? So knowing this, at least ensure that you have a brilliant 404 error page set up on your website. A ‘404’ is the HTTP response code received when a page isn’t found, something that all too often is left as a bland, server default, error message. A brilliant 404 landing page will help garner a little bit of forgiveness from your website users (or at least your users with a sense of humour!).

有了市场上所有这些工具,其中许多可以免费下载和使用,您的网站上的断开链接确实没有任何借口。 但是,正如我前面提到的,您无法阻止人们在地址栏中键入什么内容,或者阻止人们将其用作指向您网站的链接。 另外,我们都会犯错,对吧? 因此,至少要确保您在自己的网站上设置了出色的404错误页面。 “ 404”是未找到页面时收到的HTTP响应代码,而这些信息常常被留作乏味的服务器默认错误消息。 出色的404登陆页面将帮助您的网站用户(或至少具有幽默感的用户)获得一点宽恕。

In your WordPress theme folder, you’ll probably find a 404.php template that you can edit, but you’ll need to check your theme settings and documentation. You can find out more information on how WordPress 404 pages work over at the WordPress Codex. You can also modify your web server configuration, such as your .htaccess to do something funky with 404s.

在WordPress主题文件夹中,您可能会找到一个可以编辑的404.php模板,但您需要检查主题设置和文档。 您可以在WordPress Codex上找到有关WordPress 404页面如何工作的更多信息。 您还可以修改您的Web服务器配置,例如.htaccess以对404做一些时髦的事情。

If you’re looking for something with a few more options, here are a few useful plugins for monitoring and managing your 404s:

如果您正在寻找更多选项,请使用以下一些有用的插件来监视和管理404:

If you’re suppressing errors, take extra care that everything is working as it should. Redirecting 404s can be a double-edged sword, at the very least, make sure your logging errors so you know when something goes wrong.

如果要抑制错误,请格外小心,确保一切正常进行。 重定向404可以是一把双刃剑,至少要确保您的日志记录错误,以便您知道何时出了问题。

I’ve included below a few examples of amusing 404 pages to give you a few ideas (you can also find more here and here). As always, if you know of any other useful tools or tips related to this topic, feel free to include your comments and suggestions below.

我在下面提供了一些有趣的404页示例,为您提供了一些想法(您还可以在此处此处 找到更多 信息 )。 与往常一样,如果您知道与此主题相关的其他有用工具或技巧,请随时在下面提供您的评论和建议。

Hootsuite 404


99designs 404


Google 404


WooThemes 404


Etsy 404


Facebook 404


GitHub 404

翻译自: https://www.sitepoint.com/managing-broken-links-404s-wordpress/

wordpress404

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值