Find and fix broken links

Would it be possible to remove all dead links from the forum?

1 Like

What’s your criteria for a broken link?

Some CMS return 404’s when the current user doesn’t have access to the page, would that be considered broken?

Is it better users see the old broken link to help identify the new source? What would you show in their place?

1 Like

Interest question. In the catalogs of sites (clone Dmoz) all existing links are checked for errors. In Discourse, the links are in the body of the document ( They are not stored in a separate table?). I think that it is possible to create a link parser from the Discourse database in order to check their status using a third-party plugin. And in the countdown, display the status of “broken” links and the number of the post.

1 Like

Thinking of the topic_links table?

discourse/topic_link.rb at master · discourse/discourse · GitHub

1 Like

If in a separate table (thanks, I will study), then, apparently, the task is simplified. I’ll free myself a bit and think about how to do it better. The goal is interesting, especially for communities where there are external links in many posts.

Added: an additional opportunity to work with links. In our case, we want to extract all the links, sort them, check the status of the links, “link weights” and add them to our catalog. Where catalog moderators could describe interesting resources.

So it is possible (in a specific case) to link Discourse and the base of sites in the form of a catalog.


I get the message of errors mostly broken links to amazon s3. I would remove them manually but if I search forum by link it doesn’t show.