Broken Link Checker for WordPress

Notice: This plugin has been transferred to ManageWP. I am no longer working on it. Please direct any feedback to the new developer. See the plugin homepage for more information.

Sometimes, links get broken. A page is deleted, a subdirectory forgotten, a site moved to a different domain. Most likely many of your blog posts contain links. It is almost inevitable that over time some of them will lead to a “404 Not Found” error page. Obviously you don’t want your readers to be annoyed by clicking a link that leads nowhere. You can check the links yourself but that might be quite a task if you have a lot of posts. You could use your webserver’s stats but that only works for local links.

So I’ve made a plugin for WordPress that will check your posts (and pages), looking for broken links, and let you know if any are found.

Features

  • Detects links that don’t work, missing images, deleted YouTube videos and other problems.
  • Periodically checks links in posts, pages, comments, custom fields and the blogroll.
  • New and modified entries are checked ASAP.
  • Notifies you on the Dashboard if any problems are found.
  • Lets you edit all instances of a specific link at once.
  • Gives you a list of all links ever posted on your site, with the ability to search and filter it.
  • Lets you apply custom CSS styles to broken and removed links.
  • Highly configurable.

The broken links show up in the Tools -> Broken Links tab along. If any invalid URLs are found a notification will also show up on the Dashboard widget. To save screen real-estate, the widget can be configured to stay closed most of the time and automatically expand when broken links are detected.

Download

broken-link-checker.zip (412 KB)

    Requirements

    • WordPress 3.0 or later
    • MySQL 4.1 or later

    The current version of this plugin is only compatible with WordPress 3.0 and up. If you have an older version of WP, try one of the older releases. Specifically, version 0.8.1 is the last one that’s still compatible with the WP 2.8 branch, and version 0.4.14 is the last one compatible with WP 2.1 – 2.6.x.

    Installation

    Install “Broken Link Checker” just like any other WordPress plugin :

    1. Download the .zip file (see below).
    2. Unzip.
    3. Upload the broken-link-checker folder to you /wp-content/plugins directory.
    4. Activate the plugin in the Plugins tab.
    Related posts :

    2,584 Responses to “Broken Link Checker for WordPress”

    1. Mike Gantt says:

      @Janis,

      Is this what you’re looking for?

      Log: Empty reply from server [Error #52]
      === (No response) ===

      Link is broken.

    2. Mike Gantt says:

      @Janis,

      By the way, when I first installed your plugin several months ago, I was getting no broken links. You advised me to increase the “Server Load Limit” in the Advanced Settings, which I did. It sits at 25 now (I just set it slightly above the “current load”). Might this have something to do with the false positives and my unique setup?

    3. Jānis Elsts says:

      Yes, that’s the log I was referring to.

      “Empty reply from server” is a tricky one. It means that the plugin was able to connect to the server and send its request, but the server sent back an empty response. It’s hard to say why that happened; only the server knows for sure.

      It sits at 25 now (I just set it slightly above the “current load”). Might this have something to do with the false positives and my unique setup?

      25 seems rather high. The server might be running close to its resource limits. That could cause false positives due to timeouts, out-of-memory issues and temporary downtime. I don’t know if it would cause “empty reply from server” errors in particular, though.

    4. […] zähle ich im Bereich der internen Organisation den Broken Link Checker. Dieses Plugin überprüft, ob die internen und externen Verlinkungen Ihrer Website noch gültig […]

    5. […] links automatically? Of course I wouldn’t ask you that if there wasn’t one; check out Broken Link Checker. You can set it to scan your website automatically and notify you of broken links via notifications […]

    6. Well, I’ve sent in a ticket to my hosting company just to see if there is anything they can do to make sure Google knows where they are. I’m really bummed because I rely on the Redirected to know when people close down their blogspot.com blogs — the links don’t break because Blogger redirects them to a “this blog is gone” page. But I can’t keep track with hundreds and hundreds of location-based redirects. Blergh.

      Some further questions:
      * If I “Dismiss” a link in the queue, does it then never check that link again? Or does it recheck it again the next time around?
      * What is 403 Forbidden? I’ve been getting that one quite a bit lately.

      Thanks again,

      ~Angela~

    7. Jānis Elsts says:

      If I “Dismiss” a link in the queue, does it then never check that link again? Or does it recheck it again the next time around?

      BLC will keep checking dismissed links as normal. It will just never report them. Their current status will show up in the “Dismissed” section of the “Broken Links” page.

      What is 403 Forbidden? I’ve been getting that one quite a bit lately.

      It’s pretty much what it sounds like. It means that when the plugin tried to check the link, the server told it that it doesn’t have permission to access that page (“access forbidden”).

      When you see “403 Forbidden” on working links, it’s usually because the linked site/server is being paranoid and blocking BLC’s requests for one reason or another. For example, maybe the server is configured to block any software that sends automated requests, or to prevent bots from accessing specific file types (e.g. images), and so on.

    8. Thank you for those details! Very helpful.

      I have been going back and forth and back and forth with my hosting company. I’m having a very difficult time making them understand what is going on. Their last message to me is that they don’t believe that Google is mistaken and now they want logins to my WordPress install so they can try to recreate the issue. I’m not at all sure how to help them “recreate” the issue. Nor do I particularly want to give them my WordPress admin password. Suggestions? I know this is far outside your area of responsibility, but you’re the only person talking sense right now.

      If for some reason Google figures out the server is not in Canada, will the links resolve themselves or will they stay in the Redirect queue until I recheck them?

      ~Angela~

    9. FYI, I set up a test bed for them on another domain (on the same server) and got the exact same results. They responded by saying that *my* domain wasn’t redirecting, so there wasn’t a problem with the server, that blogspot blogs are not their responsibility, but that I could implement a blogspot blog solution for “my” blogs to prevent them from redirecting. They also said that they had read all of my emails and completely understood my problem. At this point I am feeling like my only recourse is to talk to Google, which seems futile at best. If you have any suggestions, please, I would love to hear them. ~Angela~

    10. Jānis Elsts says:

      If for some reason Google figures out the server is not in Canada, will the links resolve themselves or will they stay in the Redirect queue until I recheck them?

      The plugin will still check those links periodically, so if they stop redirecting, they will resolve on their own.

      I am feeling like my only recourse is to talk to Google, which seems futile at best. If you have any suggestions, please, I would love to hear them.

      Maybe you could try adding “/ncr” after blogspot.com? According to the Google FAQ, that will prevent the redirect. I can’t test it myself since Blogspot doesn’t redirect for me, but I’d recommend changing one or two of the links to something like this:
      “http://example.blogspot.com/ncr”

      However, this might still end up as a redirect, only redirecting to the .com version of the site instead.

      Alternatively, perhaps you could ignore the redirects. After all, a redirect isn’t an error. And since they’re country-specific, they’re probably not hurting your visitors.

    11. Thanks, Janis. I tried the /ncr but the plugin regards it as a redirect to .com, so doesn’t help me.

      The problem is that I rely on the redirect queue to know when a link is no longer valid, since blogspot.com blogs don’t disappear, they just redirect to a “blog not found” page. Some blogs also will redirect to a domain for sale page. I would prefer not to have that stuff littering up the site. Outbound link quality is one measure of page quality, not a large one I grant you, but every little bit counts.

      And, since there are SO MANY of them (868!!! 27 pages of them!!!) there’s really no practical way for me to have the redirect queue be of use now because it’s so clogged with the blogspot redirects that to find the real redirects and fix them in there is like a needle in a haystack.

      Thank you again for your patience. I’m just very disappointed, but it’s not your fault. I love your plugin. Unfortunately my hosting company doesn’t understand despite me setting up an entire test bed for them and keep reiterating that there’s no problem. They even changed the links on the test post to .ca and then tried to tell me that it was my fault in the first place. So frustrating.

      Oh well.

      ~Angela~

    12. Jānis Elsts says:

      I see. Could you post a few examples of links that redirect to “blog not found”? Maybe, in the future, I could add an extra check to BLC that makes those links show up as broken.

    13. Alicia says:

      How is one suppose to know when the checker is complete? I ask because it seems that it will get to a certain point and stop and then restart checking all my links again. I never actually get a message or display that says “No broken links found.
      No URLs in the work queue Detected 4169 unique URLs in 4169 links.”

    14. Jānis Elsts says:

      It’s never “complete”. This plugin is designed for continuous monitoring. It will periodically re-check each link. You can control how often that happens by changing the “Check each link: Every X hours” setting.

      If you want a once-off site scan, you’ll need to use some other tool.

    15. Des Walsh says:

      Thanks for providing this plugin. It’s especially helpful in fixing/unlinking a lot of links from old blog posts.

      One problem I have noticed a lot lately is that it keeps listing a whole lot of perfectly good links to LinkedIn profiles as broken links. Any thoughts on that?

      Apologies if this has already been handled. I haven’t read through all 2,335 comments!

    16. Jānis Elsts says:

      Someone else reported a non-reproducible problem with LinkedIn links a while ago. In their case, LinkedIn returned the status code “999 request denied” for profile links. Are you seeing the same code, or some other error? If it’s different, could you post an example or two?

      Also, try clicking the status message for additional details. What does the “Log” field say?

    17. Bill says:

      How do we prevent the link checker from reporting broken links in draft pages?

    18. Jānis Elsts says:

      Go to “Settings -> Link Checker -> Look For Links In” and uncheck the “Draft” option in the “Post statuses” section.

    19. Bill says:

      Thanks. The only thing we have checked there is Published.

    Leave a Reply