{"record":{"id":"fbb0862e5c456c83","repo":"getzola/zola","slug":"found-broken-external-link-s","errorCode":null,"errorMessage":"Found {} broken external link(s)\n{}","messagePattern":"Found (.+?) broken external link\\(s\\)\n(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"components/site/src/lib.rs","lineNumber":389,"sourceCode":"        }\n\n        // check external links, log the results, and error out if needed\n        if self.config.is_in_check_mode() && self.check_external_links {\n            let external_link_messages = link_checking::check_external_links(self);\n            if !external_link_messages.is_empty() {\n                let messages: Vec<String> = external_link_messages\n                    .iter()\n                    .enumerate()\n                    .map(|(i, msg)| format!(\"  {}. {}\", i + 1, msg))\n                    .collect();\n                let msg = format!(\n                    \"Found {} broken external link(s)\\n{}\",\n                    messages.len(),\n                    messages.join(\"\\n\")\n                );\n                match self.config.link_checker.external_level {\n                    config::LinkCheckerLevel::Warn => log::warn!(\"{msg}\"),\n                    config::LinkCheckerLevel::Error => return Err(anyhow!(msg)),\n                }\n            }\n        }\n\n        Ok(())\n    }\n\n    /// Insert a default index section for each language if necessary so we don't need to create\n    /// a _index.md to render the index page at the root of the site\n    pub fn create_default_index_sections(&mut self) -> Result<()> {\n        let mut missing_sections = Vec::new();\n        for (index_path, lang) in self.index_section_paths() {\n            if let Some(index_section) = self.library.sections.get(&index_path)\n                && self.config.build_search_index\n                && !index_section.meta.in_search_index\n            {\n                bail!(\n                    \"You have enabled search in the config but disabled it in the index section: \\","sourceCodeStart":371,"sourceCodeEnd":407,"githubUrl":"https://github.com/getzola/zola/blob/61d30828217957120309db657950224edf9707e2/components/site/src/lib.rs#L371-L407","documentation":"In check mode, Zola verifies external (http/https) links. If external_level = \"error\" and any external links fail to resolve (network error, 404, timeout), load fails with this message listing each broken URL.","triggerScenarios":"zola check with check_external_links enabled and a linked external URL returns a non-success status or cannot be reached; external_level = \"error\" in config link_checker.","commonSituations":"Dead external links after third-party sites moved or shut down; CI running checks without network access; rate-limited or bot-blocked hosts (e.g. GitHub, social media) returning 4xx/5xx; temporary network outages.","solutions":["Fix or remove the broken external URLs listed in the error output","Set link_checker.external_level = \"warn\" in config.toml so broken links warn instead of failing","Run the check on a machine/CI job with working internet access","Exclude unreachable-by-design hosts if the checker offers ignore/skip options, or replace links with a stable archive URL"],"exampleFix":"// before: config.toml\n[link_checker]\nexternal_level = \"error\"\n// after\n[link_checker]\nexternal_level = \"warn\"","handlingStrategy":"fallback","validationCode":"// Pre-check critical external URLs before a release build:\n// curl -fsSL -o /dev/null --max-time 10 https://example.com/page || echo BROKEN","typeGuard":null,"tryCatchPattern":"// Use warn level so flaky external hosts don't fail builds:\n// [link_checker]\n// external_level = \"warn\"\nmatch result {\n    Err(e) if e.to_string().contains(\"broken external link\") => {\n        log::warn!(\"continuing despite external link failures: {e}\");\n    }\n    other => other?,\n}","preventionTips":["Run link checks in a scheduled job, not on every build","Set external_level = \"warn\" for hosts known to block bots","Periodically audit external links and replace dead ones with archive.org snapshots"],"tags":["rust","link-checker","network"],"backgroundTag":"broken-external-link","analyzedSha":"61d30828217957120309db657950224edf9707e2","analyzedAt":"2026-09-03T14:39:09.727Z","contentChangedAt":"2026-09-03T14:39:09.727Z","schemaVersion":2},"datasetVersion":"2026-09-10T17:17:09.494Z"}