ComboStrap Quality - Broken links
About
A broken link is a internal link that points to:
- or a non-existing media (such as an image)
They hurt your SEO and should be avoided at all cost.
You can monitor them and you can even list them
List
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