Link text shows one address, the link goes to another
link-text-url-mismatchon by defaultJapanese / English
A link whose text is a URL on one site and whose target is on another
Example
How to fix
Check which of the two is right and make the other match. Naming the target in words ("[the setup guide](https://…)") avoids the mismatch altogether.
Why it matters
A link whose text is an address ("[https://example.com/guide](https://other.example/page)") that names a different site from where the link goes. The reader clicks expecting the address they see and lands somewhere else. It is usually what is left when a URL was changed in one place only, and it is also the shape phishing uses. On the same site (host), a path the target does not start with ("[github.com/acme/handbook](https://github.com/handbook)") is another page, and is reported.
What it does not flag
A shortened display of an address on the same site ("[github.com/a](https://github.com/a/b)", or one cut with "…"), link text that is not an address, relative or in-page targets, and reference-style links ("[text][1]") are not reported. "www." and letter case are ignored.
Turning it off or relaxing it
Technical details
- Layer
- L1
- Status
- stable
- Severity
- warning
- Languages
- Japanese and English
- Suited to
- business, technical, blog, legal, docs, academic, literature, speech
- Reads from the document
- markdown
Levels
Set a level for this rule under rules in chaff.yaml. With nothing set, it runs at the level its genre gives it (see By genre below).
| strict | error |
|---|---|
| normal | warning |
| relaxed | info |
This rule has no limit to count to. A level sets how a finding is marked: relaxed keeps the finding and marks it a step lower.
By genre
- Runs by default in
- technical/spec, technical/readme, blog/tech, blog/essay, blog/owned-media, business/proposal, business/report, business/email, business/press-release, business/meeting-notes, legal/contract, legal/statute, legal/judgment, legal/patent, docs/manual, docs/faq, docs/glossary, academic/paper, literature/fiction, literature/essay, literature/poetry, literature/play, speech/address, speech/transcript
Message
The link text shows "{shown}" but the link goes to "{target}"
Rewrite depth (chaff fix-plan --depth): light — words and sentences; the structure and the voice stay
This page is built from the rule's definition file:packages/chaff/rules/link-text-url-mismatch.yaml