Table of Contents

About

A broken link is a internal link that points to:

They hurt your SEO and should be avoided at all cost.

You can monitor them and you can even list them

List

Cli

You can use the cli command called broken-link to list them

Example * on the server

./bin/plugin.php combo broken-links

* in dokuwiki docker with the combostrap site.

docker exec -it site-com-combostrap php ./bin/plugin.php combo broken-links

Sql

You can query the database against the page statistics data with the below Analytics SQL to list the page with broken links and their count along with the path of the page

with validPages as (select path, analytics
                     from pages
                     where json_valid(analytics) = 1)
select path,
       json_extract(analytics, '$.statistics.internal_broken_link_count') as broken_link,
       json_extract(analytics, '$.statistics.media.internal_broken_count') as broken_media
from validPages
where json_extract(analytics, '$.statistics.internal_broken_link_count') is not null
   or json_extract(analytics, '$.statistics.media.internal_broken_count') != 0