# Tutorial: How to Check Broken Links in Hugo

**URL:** <https://discourse.gohugo.io/t/tutorial-how-to-check-broken-links-in-hugo/54750>\
**Category:** tips & tricks\
**Created:** [May 15, 2025, 3:10pm UTC](https://discourse.gohugo.io/t/tutorial-how-to-check-broken-links-in-hugo/54750 "2025-05-15T15:10:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [May 15, 2025, 5:56pm UTC](https://discourse.gohugo.io/t/tutorial-how-to-check-broken-links-in-hugo/54750/2 "2025-05-15T17:56:15Z")

</div>

On the Hugo documentation site we use a link render hook that performs real-time validation of _internal_ links, including fragments (e.g., `/functions/foo/#something`). It is based on [this code](https://www.veriphor.com/articles/link-and-image-render-hooks/#link-render-hook) with the addition of some special handling unique to our documentation site.

With the amount of content restructuring we’ve done over the last 18 months, and the restructuring currently in progress, this hook is (at least to me) essential. Getting immediate feedback when, for example, you change the name of heading, saves a lot of time. If you only check your _internal_ links periodically, you can end up with what I would describe as “stacked” broken links that can be a hassle to fix.

For _external_ links, validation prior to or during deployment is sufficient.

---

_[View the full topic](https://discourse.gohugo.io/t/tutorial-how-to-check-broken-links-in-hugo/54750)._
