The /writing/cache/ mentioned in the article has been renamed, but the build was still successful. External documentation temporarily returns a 429 error, preventing the entire site from being deployed. Link checking needs to be both strict and able to differentiate between results that are under our control and those that are affected by remote networks.
This article uses a Markdown technology blog as an example. The goal is to provide readers with accessible and relevant citations, rather than simply returning all URLs with a 200 status code as definitive proof.
Establishing a Link Type Model and Selecting a Verification Strategy
Assume the main content includes internal articles, in-page anchors, official documentation, email addresses, and code strings. These are not the same objects to be checked. A structured extractor identifies genuine link nodes, preserves the source file and location, and then categorizes them according to the protocol. URLs within code blocks can be examples and should not be automatically requested; email links can be validated for syntax and adherence to public policies, but should not be used to send emails to the addresses. The checker’s permissions should not exceed those required for the editing validation task.
The internal page structure is determined by the current build and can be strictly validated. External URLs are maintained by others and require network status classification. Special protocols are allowed or denied based on their intended use. Relative links rely on the source page address resolution and cannot be unified by the site root directory. When using ../guide/, the source location determines the target. Markdown images and regular links have different risks regarding display, but both require resource accessibility or legal fallback.
Internal paths can be fully defined during construction
First, collect the generated list of routes. Then, parse internal links within the article and normalize them according to the site’s base URL and trailing slash rules. The target destinations should point to existing pages or explicitly redirect to them. Drafts should not be used as link targets for public articles.
const target = new URL(href, pageURL);
if (target.origin === site.origin) {
const route = normalizePath(target.pathname);
if (!publicRoutes.has(route)) {
throw new Error(`Missing internal route: ${href}`);
}
}
Example: Omitting detailed parsing and path normalization, it’s not possible to directly scan all Markdown using string regular expressions. Links may contain headings, citation definitions, or HTML attributes, making a mature Markdown AST parser more suitable for structured extraction.
All articles, tags, pagination, and fixed pages have complete paths recorded. After link resolution, these paths are compared against the list. Redirect sources can be used as legitimate transition targets, but the report recommends updating them to the final destination. Redirect loops or missing final destinations result in failure. Private drafts are not considered legitimate public targets, even if they exist in the local file system. Referencing drafts requires a private editing tool and does not allow for the generation of publicly accessible addresses.
The trailing slash, encoding, and deployment prefixes follow the same rules as production. Do not implement a more lenient normalization within the link checking process, allowing it to accept addresses that are inaccessible online. Unicode paths can work, but you should handle differences between encoding and standardized formats, and use a structured URL API. The check records retain the original links to help authors make modifications, while also limiting sensitive query parameters in the logs.
Large sites can be accelerated by focusing on changes, but changes to the target path will affect unmodified articles, so a reverse reference relationship is required. Only checking new files will miss the historical links of deleted paths. After building a complete list, checking all internal references is usually more reliable. Performance optimization should be based on actual scale, and should not sacrifice coverage in advance. The link task is related to content consistency, not a search engine indexing test.
Final Rendering Results Dependent on Anchor Points
The ID generated by the “Cache and Invalidate” feature depends on the renderer and plugins. You cannot create a custom slug function that differs from the builder’s to check anchor points. A more reliable approach is to parse the final HTML and verify the existence of the link fragment.
Repeated headings may include numbered suffixes, and handwritten tables of contents are the most prone to becoming outdated. After modifying headings, check internal anchor links, including those from other articles. URL encoding and Unicode normalization must be consistent with browser behavior; simple string comparison of unencoded strings is not sufficient.
The title rendering process may involve Chinese slugs, duplicate numbering, and plugin transformations. The checker should not guess the ID. Parse the final HTML, collect the actual ID, and compare it based on the browser URL fragment handling rules. Both in-page and cross-page links should be checked, and the output from directory plugins also needs verification. Duplicate IDs should be reported separately, as the browser may jump to an unexpected node, even though the URL appears to be correct.
When linking to a dynamically generated client-side area, the generated HTML may not always contain the target. It’s best to provide a server-side structure for key article anchors, and to register any necessary exceptions with their reasons, rather than unconditionally skipping all missing fragments. Even if the client-side script fails, the target should still have a readable entry point. When modifying the title, it should indicate which external or internal anchors may be affected. The stability of the article slug does not necessarily guarantee the stability of the chapter identity.
Limited Concurrent Access and Categorization of External Checks
Some sites reject HEAD requests but allow GET requests; some documents have regional or login restrictions. The checker should support limited retries, limit download size, timeout, and retries. Do not download the entire content of remote pages into the CI logs, and do not use unlimited concurrent requests to disturb the referenced sites.
Distinguish between permanent failures, temporary failures, rate limiting, authentication requirements, and redirects. For clear 404 errors, either prevent publishing or require editor confirmation. For temporary network failures, generate reports and follow up later. The policies should be explicit, not ignoring all errors, nor should they cause publishing to halt every time there is network instability.
The checker possesses network capabilities when executed in CI (Continuous Integration). Links provided by the user may point to internal network or cloud metadata addresses. Restrictions are applied to allowed protocols, targets, and redirects, utilizing established SSRF (Server-Side Request Forgery) protection. The checker does not treat simply checking status codes as risk-free. Download settings are configured with size and time limits, and authentication information is not automatically forwarded to external sources. Sending private cookies or production tokens for verification purposes is prohibited.
Concurrency and retries are limited, respecting rate limits. Avoid using excessive requests to test documentation sites. If a HEAD request fails, try a controlled GET request to retrieve only the necessary parts. Some websites require browser context or reject automated tools. Report uncertain results and manually verify them, without bypassing access restrictions. Cache recent results with timestamps and status information, but do not permanently retain a successful result while ignoring subsequent failures.
The target of the redirection needs to be categorized. Suggesting updates to related new documents can be helpful, but navigating to the homepage or login page may no longer support the original reference. A 200 status code only indicates a successful response, and content relevance still relies on editorial review. External network checks and experimental validation are kept separate to avoid the report appearing “green” and misleading authors into believing that all technical judgments have been proven.
Reachability does not equal effective referencing.
Even if a link jumps to the website homepage, it might still return a 200 status code, but it no longer supports article detection. Versioned document links might point to new behaviors, and the old code examples are no longer accurate. Manual review requires checking content relevance, version, and citation locations.
You can save citation titles, access dates, and key version notes, but avoid copying large sections of copyrighted content as a “permanent backup.” Long-term articles should primarily use official, stable documentation and standards, and should be regularly checked for citation drift.
Official documentation may be updated to a new major version, and the original code is designed for the older version. Prioritize linking versioned documentation and standards, and clearly state the version and scope of use in the article. Inspectors can save titles and final URLs to help identify changes, but cannot fully understand all the semantics. Key: Manually verify whether the cited conclusions genuinely support adjacent conclusions to avoid simply using the official homepage to enhance credibility.
Long-term inactive citations can be found through official migration or trusted archiving services. When updating, re-evaluate and assess their validity. The system does not automatically replace similar search results. Saving access time helps to understand the historical context, but does not guarantee the permanent existence of the citation. Copyright and licensing restrictions still apply, and the system does not automatically copy large amounts of third-party content into a public repository for “anti-expiration” purposes. The depth of technical articles comes from verifiable arguments, not from the number of links.
Verifying the Certainty of Policy Statements and Exception Periods
Broken internal paths and missing anchors are definite errors that the user can fix, and typically prevent builds. External issues, such as requiring confirmation or network errors, can be placed in a “pending review” status. The report should include the check time, final URL, and category, rather than just a simple “red/green” indicator. Exception records should include the reason and expiration date, and should not be permanently ignored due to a temporary issue with the document repository.
Apply stricter standards when citing important facts. A core conclusion should only rely on outdated addresses; reliable original sources should be found or the judgment should be adjusted before publication. Temporary timeouts for ordinary supplementary links should not prevent the entire content. The strategy is based on the responsibility of citing, not on whether the author finds the information to be incorrect. Manual confirmation and recording of results are also used to avoid repeatedly encountering the same issues that cannot be resolved through automated checks.
When a check succeeds, the cached result has a validity period. Even when a check fails, it should be categorized. Limiting requests reduces redundant requests in the short term, while permanent failures trigger editing tasks and prevent continuous harassment. Multiple articles referencing the same address can be requested to be de-duplicated, but the report still lists all sources. After fixing a target, you can identify which articles need to be updated. Achieving both de-duplication and preserving the editing context is possible.
Internal link redirection, even if legal, should be recommended for updates to reduce round trips and maintain clear identity. Historical external links cannot be controlled; the old paths on this site will continue to be maintained. Within articles, it is recommended to use the final standardized address as much as possible. When modifying links, verify the relevance to the content; it will not automatically replace the old page address with the new domain’s homepage. Reachability and correct referencing are different dimensions.
When performing checks in the draft repository, ensure that reports do not expose unpublished titles or paths to public CI. Private editing checks are conducted in a controlled environment, while public builds only check publicly available records. Network logs may contain unpublished links or private resource addresses, which should be protected according to the same publishing policies. The tools should not be used as a new content export mechanism to assist editors.
Finally, the checker itself is tested: URL parsing, AST extraction, source location, exception classification, size limits, and redirect safety. Controlled simulation services are used to cover responses, avoiding reliance on actual external websites that might return the same status at random. Real-time regular checks and unit tests are kept separate, avoiding test instability and making reference drift visible. The green report needs to explain the scope of coverage, rather than claiming that all knowledge has been verified.
Using a Single Migration Article to Test Reverse References
In the first example, the file “A” was moved from the old path to the new path, while files “B” and “C” still pointed to the old address. The checker identified the redirection from the final public path list and reported that “B” and “C” needed to be updated. If “A” were truly deleted, “B” and “C” would be confirmed as having broken links. By only checking the changes made to file “A”, we can see that the other two files (“B” and “C”) remain unchanged. The reverse reference graph propagates the target changes to all sources, which is more reliable than relying on authors to manually search for links.
The record includes the source article, the link node location, the target specification address, and the corresponding fragment. Network requests can be deduplicated based on the target. The report still retains all sources, even after updating the target once. This does not mean that the semantic correctness of all paragraphs remains intact. Specifically, the discussion refers to the behavior of the old version, which may require maintaining versioned documents or modifying the arguments. Link migration and fact updates are evaluated separately, and cannot automatically replace all similar addresses.
The destination URL of the redirect chain must be a valid and compliant URL. A loop, missing destination, or redirection to an irrelevant homepage will not be considered a successful redirect. Temporary and permanent migrations are distinguished in the report, providing authors with clear next steps. Old external links cannot be controlled, but internal links on this site can be updated to their final destination, reducing unnecessary round trips and clarifying resource ownership.
The AST Extractor Requires a Negative Sample Protection Range
URLs in Markdown can be real links, references to definitions, images, code examples, or plain text. Structured nodes tell the validator which elements need to be checked. Fictional addresses within code blocks should not be automatically requested. The test should include links with parentheses, titles with quotes, reference-style links, and URLs within code, to ensure that the extracted set is accurate. Using simple example links for validation will prevent bulk checks from generating false errors and unexpected network requests.
If the project allows, the original HTML should use a parser suitable for HTML to identify attributes, and explicitly specify which protocols are allowed for accessing resources. JavaScript code or dynamic expressions cannot be used to discover links; publicly submitted MDX files are also not suitable for convenient checking. The checker reads the data without gaining any code execution permissions. Targets that cannot be statically determined should be treated as explicit exceptions or component contracts, rather than being skipped indefinitely.
The source location can be within the node range, and it is not necessary to pretend that the original row and column information still exists after the conversion. The report should provide sufficient information to locate the original article and link, to avoid errors caused by inaccurate positioning, which would allow the author to correct the position. Private draft reports are stored in a controlled directory and are not uploaded to public CI. Public article checks only consume public collections. Permissions for the tool are focused on editing tasks and are not expanded to include uploading from the entire database due to the need for a full index.
Anchor Point Validation for Establishing the Final DOM Identity
Duplicate titles generated by rendering plugins may have different IDs, and title modifications can also change anchor points. After building, parse the actual ID set for each page, detect duplicates, and then verify both in-page and cross-page fragments. This cannot be simulated using a simplified slug function, as it may become detached after production plugin upgrades. Key title anchor points should ideally be generated on the server-side, and there should still be reachable sections even if the script fails.
Fragment encoding and path encoding are handled separately. URL parsing and browser semantic comparison are used to avoid repeated decoding and resulting changes in delimiters. Legitimate empty fragments and missing named anchors are not the same state. If the client-generated region has a specific need, it should record the component, target, and failure recovery, and validate it in the browser. It cannot skip all anchors using “dynamic pages.” Structural checks and actual navigation testing complement each other.
The security budget for external audits includes redirection
The initial address is public, but this does not guarantee continued security. Each hop re-verifies the protocol, target, and network policies, limiting the number of hops, timeouts, download sizes, and concurrency. Do not forward private authentication headers, and avoid infinite retries of large GET requests when the HEAD fails. Ensure the service runs with controlled network permissions and employs mature SSRF protection, including address resolution and connection handling, without relying on a limited set of string exclusions to provide comprehensive protection.
External servers may reject automatic access. HTTP status code 403 and rate limiting do not mean the link is permanently unavailable, nor do they mean verification was successful. The report indicates check times, status, and uncertain categories. Manual review cannot bypass access restrictions. Temporary cache failures prevent repeated requests, and if the absence is confirmed, it triggers an edit process. A single successful 200 status code does not permanently guarantee accessibility. Successful caching has a limited duration and supports subsequent changes.
Using “drift” status is more important than status codes
The official documentation has switched to a new main version, but the address remains the same (200), and this code is no longer supported. Record the applicable version and adjacent conclusions, prioritizing linking to the original, versioned documents. The checker can prompt for changes in headings or final addresses, but the editor ultimately determines whether the arguments are valid. Do not use the official homepage to replace the missing deep documentation; only use it to restore the green report. If reliable evidence is not found, narrowing or removing conclusions is more honest.
Archiving and reprinting have licensing boundaries; access date information indicates the historical verification time but does not grant full copying rights. Core references may cause publication to fail; temporary extension links can be reviewed later; policy-based referencing responsibilities are treated the same as full network status. Exceptions include deadlines and responsible parties to avoid a single failure becoming permanent neglect.
Checking the cache should also preserve the version of the policy being used. Once the source allows changes to rules or timeout strategies, old successful records cannot be directly used as evidence for validating new rules; changes to external addresses also require re-checking. The cache helps reduce network requests and does not grant permanent approval for referenced content. The result’s timestamp is displayed along with the rule version, allowing the editor to determine whether today’s “green” result came from a different set of conditions yesterday.
The simulation service can also return a redirect to the login page or a 404 “Not Found” homepage, ensuring that reports are not automatically marked as referencing verified sources. The automated tool can identify changes in the final URL and title, but the assessment of relevance is still performed manually. The system clearly indicates the status of sources that have not been verified, preventing a network reachability report from being misinterpreted as a complete technical argument that has been reviewed.
Report concludes with evidence of actual repair
Simulate faulty routers, missing anchor points, permanent external failures, rate limiting, and rejection of HEAD requests to validate classification and publishing policies. After fixing, re-check the original source to confirm that the target is reachable and that the semantics still support the argument. Save the scope of coverage and unconfirmed items, and do not claim that the machine results are the complete proof of the experiment. The controlled boundary is strict, external uncertainties are observable, and the linking tools truly help in maintaining technical content.
Transforming Reports into Executable Editing Tasks
The error report should include the source article, the line or node location, the original link, and the category. Only outputting 1,000 URLs will help editors determine where to make changes. Internal checks should be performed during each build, while external checks can be run on a schedule to reduce requests.
It is also important to verify the security of the request itself. Navigation may contain exit/login, one-time confirmation, or legacy execution points, and should not allow CI to access production with them simply because they are internal links. Static article paths can be validated against a routing list, and stateful entry points should only be checked against the declared interface contract. External checks do not carry user credentials and do not automatically click buttons on the page. The checker is not a robot that replaces the user in performing workflows.
Establish document and action routing within a controlled simulation environment, and record the number of accesses for each. The document routing is expected to pass through a network reachability check, while the action routing is expected to go to static classification with a zero access count. Addresses that cannot be classified require manual confirmation and should not be automatically retrieved. If an old interface modifies its status via GET, a separate interface repair task should be created, and the check should be avoided to prevent triggering it. The scope of proof includes “which addresses have never been requested,” not just the number of successful responses.
References: Astro Markdown, WHATWG URL.