linkcheck: netiquette: autoignore RFC2606 reserved domain names#14310
Open
jayaddison wants to merge 8 commits intosphinx-doc:masterfrom
Open
Conversation
In RFC2606, the IETF reserves some domain names for use in local testing. Generally we shouldn't allow the Sphinx `linkcheck` worker to make HTTP requests to these domains, because they are unlikely to resolve or to respond with success codes following requests for URL paths that include them. In addition, some second-level domains (e.g. example.org) are also reserved in RFC2606, again for similar testing purposes. This change updates the `linkcheck` worker `is_ignored_uri` method logic to return true for IETF reserved domain names. [1] - https://datatracker.ietf.org/doc/html/rfc2606
jayaddison
commented
Feb 17, 2026
jayaddison
commented
Feb 18, 2026
jayaddison
commented
Feb 18, 2026
This indicates a single-param-per-line code style for the method. (and also fixes a lint error / recommendation from `ruff`)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
I don't think that it is useful for the
linkcheckbuilder to make HTTP requests to the IETF-reserved domain names outlined in RFC2606. This recently came up as a tangential discussion from: #12985 (comment)This pull request implements some logic to ignore the relevant top-level-domains (TLDs) and second-level domains automatically.
References
Resolves #14307.