A citation anchor is an exact spot on a page with its own web address, so a person or an AI can link to the very sentence or section being quoted, not just the top of the page. It is the part of a link after the #. On a long page, it turns “somewhere on this page” into “here”. That makes a quoted fact quick to check, which is the whole point of a citation.
What is a citation anchor? #
It is a fragment: the last part of a URL, starting with #. MDN says a fragment is used to identify a specific part of the resource, such as a section of a document. There are two common ways to make one. The page author can give a heading or paragraph an id, so /page/#delivery jumps straight there. Or a link can use a text fragment, such as #:~:text=free delivery, which needs no change to the page.
Which kind should I use? #
| Kind | Who makes it | Strength | Weakness |
|---|---|---|---|
id anchor, #delivery |
The page author | Lasts while the id stays the same | Only exists where the author added one |
Text fragment, #:~:text=... |
Anyone writing the link | Points at any sentence, no change to the page | Stops matching when the words change |
MDN warns that text changes more often than page structure: if the words change, a text fragment stops matching and the browser goes to the top of the page. For links that should last, MDN says id-based fragments may be more reliable.
Why does it matter for search? #
Google already uses the idea. Its snippet guide describes a “Read more” deep link as a link within a snippet that leads users to a specific section on that page. To make those more likely, Google asks for content that is immediately visible, not hidden in tabs, and no script that moves the scroll position on page load. Clear sections with stable ids also make internal linking more precise, because a link can point at the exact answer.
Why does it matter for AI answers? #
AI answers quote facts from pages and show the source. A reader who wants to check the fact has to find it. When every heading carries a stable anchor, anyone can link to the exact spot, including the answer engines that build on grounding and retrieval. Short sections that each answer one question are also easier to quote in one piece. That is the thinking behind a page of its own for each fact and claim boundaries that say where a claim starts and stops. A checkable source helps against AI hallucination.
How does it work? #
The fragment never reaches your server. MDN says the fragment is not sent to the server when the URI is requested; the browser processes it after the page arrives. For an id, the browser scrolls to the element whose id matches. For a text fragment, it searches the visible text, scrolls to the first match and highlights it. MDN says matches are case-insensitive. You can style the highlight with the CSS ::target-text pseudo-element.
A worked example #
A bike shop’s FAQ page answers ten questions under plain headings. Before, an answer about delivery can only be linked as /faq/, and the reader has to scroll. After, the heading carries an id:
<h2 id="delivery">How long does delivery take?</h2>
Now https://www.example.com/faq/#delivery opens at that question. Someone quoting a single sentence without an id can use a text fragment instead. MDN gives the syntax as:
https://example.com#:~:text=[prefix-,]textStart[,textEnd][,-suffix]
So https://www.example.com/faq/#:~:text=next%20working%20day highlights the first match for “next working day”. The words must be percent-encoded, which is why each space becomes %20, and MDN says the dash must be encoded too. Matching ignores upper and lower case.
How do I point at the second match, or a whole passage? #
A text fragment always lands on the first match. To reach a later one, add words just before it (prefix-) or just after it (-suffix). To mark a passage, give a start and an end, separated by a comma. MDN also shows several text directives in one link, joined with &. Each piece of text must sit inside one block, such as one paragraph, although the whole match may cross elements.
What are the rules for a good id? #
MDN says an id must be unique within the entire document and must not contain spaces. It recommends values that are valid CSS identifiers, so they need no escaping in code. In practice: lower case, words joined with hyphens, short and readable. Google’s URL structure guide gives the same advice for addresses: readable words, with hyphens to mark word breaks.
Are there limits on text fragments? #
Yes. MDN says text fragments are invoked only on user-initiated navigations and only in the main frame, not inside an iframe. When linking to another site with one, MDN says to add rel="noopener". A site can opt out in Chromium browsers with a Document-Policy: force-load-at-top header. If a browser does not support text fragments, or nothing matches, the link simply opens at the top of the page.
Where do citation anchors help most? #
They help on any long page that answers many questions. Think of an FAQ, a returns policy, a price list, a guide or a wiki entry. These are the pages AI answers and searchers quote from, often one sentence at a time, as in People Also Ask boxes, ChatGPT search, Perplexity and AI Mode. A stable anchor on each answer lets the quote, the reader and your own team all point at the same spot.
Do anchors help people as well as machines? #
Yes. A table of contents built from heading links lets a reader skip to the part they need, which matters on a phone. Clear headings with their own links are also part of good web accessibility. And a sentence you can point at is a sentence you can stand behind. Showing exactly where a fact lives, and who wrote it, is part of being open about your sources. See E-E-A-T.
Common mistakes #
- Using the same id twice on one page, so only one of the two can be reached.
- Relying on a text fragment for a sentence you edit often.
- Renaming a heading’s id when you reword the heading. Every link to the old id now lands at the top. Keep the old id or add a new one beside it.
- Hiding the answer in a closed tab or accordion, so the anchor lands on nothing visible.
- Using fragments to load different content. Google says not to, as Google Search generally does not support URL fragments. Use a page of its own for content that should be found in search.
- A script on page load that strips the
#from the address. Google says this breaks deep linking.
How to check it #
- View the page source and look for
id="..."on headings and key paragraphs. Check the heading outline makes sense; the Heading Checker is live. - Open
yourpage/#that-idin a browser and check it jumps to the right place. The Citation Anchor Checker tests whether your headings have stable links AI can cite. - Make ids from your headings with the citation anchor generator, and encode the words of a text fragment with the URL encoder and decoder. Split a long link into its parts, fragment included, with the URL parser.
- Keep ids stable. Renaming one breaks every link that points to it. Find links to missing anchors and other broken links with our Broken Link Checker.
- Check the page’s canonical tag with the Meta Tag Checker, so links and anchors build on one address. If old addresses redirect, follow each hop with the Redirect Checker.
- Check the answer is in the HTML, not loaded later, since some AI crawlers do not run scripts. See JavaScript SEO; the JavaScript SEO Checker is live.
- Give AI a map to your key pages and sections with llms.txt, and test it with the llms.txt Checker. Score the whole page with the AI Readiness Checker.
- Test how quotable a page is with the AI citation readiness checker, and set your page beside a rival’s with Compare Two Websites.
- Across a whole site, the citation anchors manager keeps heading links stable and retired ones working. The fact anchors and citations report, the AI citation tracker and the citation ladder are in URSY Pro, opening in stages.
What URSY.com counts #
Because the browser never sends the fragment, no server log and no analytics tool can see which anchor a person opened. Our methodology also stores only the path of each request, never the query string. What we can count is who read the page: people, search engines, AI crawlers, AI agents and other machines (API/MCP calls included), with each named bot checked as real, fake or unknown. When a person arrives with a referrer such as chatgpt.com, we record it as observed; many AI apps send none, so it is a minimum.
Questions #
Is a citation anchor the same as anchor text? #
No. Anchor text is the clickable words of a link. A citation anchor is the spot on the page the link lands on.
Do I need ids on every heading? #
Every heading someone might quote or link to should have one. On a wiki or FAQ page, that is nearly all of them.
Will a text fragment work in every browser? #
Not always. MDN says that if the browser does not support it, the fragment is ignored and the top of the page opens. The link still works; it just lands higher.
Does Google index each anchor as its own page? #
No. Google says Search generally does not support URL fragments, so the page is indexed once at its main address.
How does this help me get cited by AI? #
It makes each fact easy to find and check. See get cited by ChatGPT and the tidy source.
Related words #
- Citation: the four levels
- Internal linking
- Anchor text
- Featured snippet
- AI Overview
- Grounding
- Correction in public
- Broken link
- URL
Sources #
- MDN Web Docs: Text fragments, checked 24 November 2026
- MDN Web Docs: URI fragment, checked 24 November 2026
- MDN Web Docs: HTML id attribute, checked 24 November 2026
- Google Search Central: Snippets in search results (“Read more” deep links), checked 24 November 2026
- Google Search Central: URL structure guide, checked 24 November 2026
Updated 24 November 2026 by URSY.com.
Cite this page: Citation anchor. URSY. Updated 26 November 2026. https://ursy.com/wiki/citation-anchor/ · Section links
Tools for this
- LiveCitation Anchor Checkerdo your headings have stable links AI can cite?Run the check →
- LiveAI Readiness Checkeris your site ready for ChatGPT, Gemini, Claude? Score + fixesRun the check →
- LiveAI Bot Checkerwhich AI bots your robots.txt lets inRun the check →
- LiveRobots.txt Checker + Generatortest any address against your rules, or write new onesRun the check →
- LiveSchema Markup CheckerRun the check →
- ProFact anchors + citationsEvery fact on a page with its sourceIn URSY Pro →
- ProCitation anchors managerStable heading links site-wide; retired ones kept workingIn URSY Pro →
- ProAI citation trackerWhich of your pages AI links to, per promptIn URSY Pro →