Are there any modules that will check a site for broken links? (search didn't turn up anything) If not, do you know of any free third-party solutions that are "drupal friendly"?

- Jason

Comments

whatistocome’s picture

Come on, this is a popular thing (or should be - who wants broken links?!? :)

whatistocome’s picture

why the lack of response? Is it me? Is it you? Is it us? What did I do wrong baby... :P

i thought a broken link checker would be something so important it would be built into core, or at a least a really popular module... but i haven't been able to find a thing, and no one is responding to this. am i missing something, thinking about this wrong, or what :) odd, odd, odd

- Jason

fen’s picture

I'm rather surprised there isn't more interest in a broken link checker, too.

We're using Checkbot but it returns many false positives due to Drupal's dynamic page creation that confuses Checkbot as to which links are local and which are remote.

Anyone interesting in building such a beast if it doesn't already exist?

whatistocome’s picture

I think this is a great idea for a module and one that is sorely needed. What screams unprofessional and unhelpful on a website more than broken links - it takes away from even the best navigation systems and can really hurt getting and retaining visitors. And as Drupal-based websites allow for larger and more complex sites, the chances of broken links increase (it's one of my biggest fears for the sites that I run). So....

I second the question on if there's anyone interested in building a broken link checker module for drupal?

For my part, I don't code but I can help a lot on documentation, adding to the list of ideas and testing, testing, testing (i luckily stumbled upon the chatroom module only a couple days after it was posted and it's been great and rewarding to help test such a new and exciting module). I'd love to do that for this module as well - it'd be a blast :)

- Jason

whatistocome’s picture

Where is the best spot on drupal.org to ask if there's any developers in developing such a module as this?

nancydru’s picture

Web Links, which checks for broken links on your cron schedule.

lccweb’s picture

if you are running windows on your workstation try this program: "xenu link sleuth" (freeware). i downloaded my copy off of snapfiles.com but this is the link that the about brings up: http://home.snafu.de/tilman/xenulink.html

i used it to track down all the pages that linked to a node that we had given a new alias. it found them plus some we weren't aware of.

it can be set to ignore external links and internal ones you might not want to report. once the run is complete a list of broken links is listed, along with some stats. pick one from the list and right click, show the property and you can see what links to that entry.

good luck.

tregeagle’s picture

and for those of you on linux....
Linkchecker

check websites and HTML documents for broken links
Provides a command line program and web interface to check links
of websites and HTML documents.
Features:

  • recursive checking
  • multithreaded
  • output in colored or normal text, HTML, SQL, CSV, XML or a sitemap
    graph in different formats
  • HTTP/1.1, HTTPS, FTP, mailto:, news:, nntp:, Gopher, Telnet and local
    file links support
  • restrict link checking with regular expression filters for URLs
  • proxy support
  • username/password authorization for HTTP, FTP and Telnet
  • robots.txt exclusion protocol support
  • Cookie support
  • i18n support

- yep a link checker would be a good module to have.....

cheers
- ruben

brashquido’s picture

I'm currently looking at sponsoring a module that does something very similar to this. Basically it will be a suite of modules that enable you to manage downloads, weblinks and links embedded into text areas with an admin component that continually cycles through the links checking that they are healthy and report the results. In the end it will be very similar to the Links Package, but it will be complete. It is shaping up to cost me several thousand dollars, so if anyone feels like chipping in for sponsorship please feel free to contact me for further details ;) .

----------------
Dominic Ryan
www.iis-aid.com

kubrt’s picture

Hi there,
I have developed a simple module for detecting broken links in drupal nodes. It works silently at the background using cron hook to slowly go through all or just recently edited nodes and maintain a table of broken links. Broken links are reported together with the (clickable) nid of the node where they were found. If you want to check out the devel version for 5.x, get it from http://marek.greennet.org.uk/linkchecker/linkchecker-5.x-0.1-dev.tar.gz. Suggestions for improvements and other features welcome.

Marek Tichy

faunapolis’s picture

Wow, cool, this is a must have. Also subscribing for updates. Thanks

http://www.faunapolis.org/

tomaslucas’s picture

Hello Marek,

Do you think if you will up this module to drupal.org cvs repositories ?

Thanks in advance.

Regards.

neurojavi’s picture

I think your module seems very interesting...
I'll try it in short.

Thanks.-

egfrith’s picture

Hello Marek,

this looks like a really useful module -- something I've been thinking that might be useful for a long time.

Getting its functionality into the drupal contrib repository would be great, but before you do that, I would suggest that you consider talking with the developer of the links module to see if it could become part of that module or use some of the links functonality.

jiangxijay’s picture

Subscribe

MGParisi’s picture

Then we can keep upto date, and also find it easer. Also Subscribe :-p

john_springer’s picture

Marek. I was desparately looking for something like this.
But when I installed, I got an error message about pass-by-reference for preg_match_all in the module.
I'm not sure hwo to fix this. It seems to want me to change the syntax of the call. ??

J

kubrt’s picture

Hi John,
my mistake (in a code that I borrowed from somewhere). The line 353 should be

preg_match_all("|href\=\"?'?`?([[:alnum:]:?=&@/;, %+._-]+)\"?'?`?|i", $html, $matches);

not

preg_match_all("|href\=\"?'?`?([[:alnum:]:?=&@/;, %+._-]+)\"?'?`?|i", $html, & $matches);

Sorry for that. http://marek.greennet.org.uk/linkchecker/linkchecker-5.x-0.1-dev.tar.gz contains the correct code now.

Marek

ianr’s picture

Good idea, I was about to write something to do the same, and of course I did a search first! This is a much better approach than using an external service to map the links on the site, as this approach could also check unpublished stories etc.

mgifford’s picture

Thanks for posting the link. I installed it and found a couple broken links in a Drupal wiki we have. All internal stuff, but still good to know that it works.

How it works with the existing links module (especially CCK field types) is something I'm interested. Also curious about the license and would encourage you to formally release it under the GPL & toss it up on Drupal.org. It's a worth while contribution that would benefit the community.

Mike
--
OpenConcept | SEO | Tech | Screencasts

chrisfromredfin’s picture

Without it in the drupal contrib section, it's hard to tell if there's a newer version. Do you have your own blog/web site set up re: linkchecker? Do you need help contribbing the module? Is there a newer version than 5.x-0.1?

.cw.

.cw.

mark matuschka’s picture

Subscribing.

ch1mjw’s picture

Have you tried Janode: http://drupal.org/project/janode which works well. I'd like to see a CCK link field that checks itself, but this is beyond my competence to do myself

"This is a node type that allows you to create a library of http://
links to other resources on the Internet. Each node has a title, the
matching url and a description. The node can be allocated to a
taxonomy in the normal way.

You can use Janode to create your own web directory. Janode also
periodically checks each http:// link for 404 errors. Any Janodes
with a 404 error are put into a moderation queue for investigation."

summit’s picture

+1 to put this in the links_package.
subscribing.
Greetings,
Martijn

momper’s picture

subscribing

summit’s picture

Subscribing. +1 for links package integration!
greetings,
Martijn

giggler’s picture

Subscribing...

nancydru’s picture

migas’s picture

Please make a project section. I was glad to found this small but effective mosule! And I don't know, why drupal hasn't got it integrated. Now I have to switch to Drupal 6 and yes, I would really miss this module. Please make it run for Drupal 6! That would be great!
Greetings from Salzburg, Michael

kubrt’s picture

Hi,
I've just made an initial release http://drupal.org/project/linkchecker.
Will work on the Drupal 6 version as soon as I upgrade to D6 myself.
Regarding the integration with links module, can somebody talk to me off the list in more detail.

Thanks
MT

emerygjr’s picture

We would be very interested in getting a D6 version. We can help with testing.

Emery Gordon

Emery Gordon

mrfelton’s picture

Add me to the list of very interested users for a D6 port. Perhaps I can help out?

--
Tom
www.systemseed.com - drupal development. drupal training. drupal support.

TrentCats’s picture

Subscribing

wwwoliondorcom’s picture

Hi,

Thank you for this useful module, but I'm using it with DRIGG, the Digg-like module, and it doesn't report any broken links, so do you have any idea why ?

Does it work with any kind of node (drigg nodes are maybe not usual ?)

Thanks.

wwwoliondorcom’s picture

Actually it didn't report any broken link after the first crons but then it found some, so I can say that this module is great to use with your digg like website, as many users will post links that won't work any more after some time.

Thanks !

kepford’s picture

This is really needed. I manage a few sites that link to sites that don't follow best practices of redirects and dead links always bite me.

Bob Kepford
TheWeeklyDrop - A Weekly Drupal Newsletter

allartk’s picture

I've to admit, I started with searching for a drupal solution, but the anwser seems really simple:

http://www.google.com/search?q=link+checker , the first link ;)

summit’s picture

The Weblinks module (www.drupal.org/project/weblinks) checks for broken links.

If you like this info please put a link on your site to http://www.trekking-world.com a private e-development aid initiative

greetings, Martijn.

R.J. Steinert’s picture

I think folks are looking for a module to find broken links across their entire site. If they aren't already using weblinks, then weblinks won't do them much good because weblinks will only check link validity on weblink nodes.

"Web Links provides a comprehensive way to post weblinks to your site. All links are nodes, which may be put into taxonomies/categories and administered."

Be well,
R.J. Steinert III
RjSteinert.com

"Happiness is the process not the place."
-Diener

no2e’s picture

the mentioned "weblinks" module creates links as nodes, correct?
I just want to have all links at my whole Drupal site (or at least the links which are entered in CCK Links) checked, and I don't want to create each link as a node.
Any chance for Drupal 6?

nancydru’s picture

The basic design of the Weblinks module is to create a links page for your site, which many, if not most, sites maintain. So, yes, the module does create nodes. There is also a filter function available that will allow users to easily link to a properly maintained link rather than constantly having to browse the site looking for them.

One of our users is working on a "collector" which will identify all links in the content and build weblinks nodes from them so that they may be included in the links page.

NancyDru (formerly Nancy W. until I got married to Drupal)

R.J. Steinert’s picture

Did the "collector" module ever materialize?

Be well,
R.J. Steinert III
RjSteinert.com

"Happiness is the process not the place."
-Diener

WorldFallz’s picture

Do you realize you're posting to a >3year old thread (ancient in drupal terms). For link checking there's the http://drupal.org/project/linkchecker module now.