Upload scan
Use this when the broken anchor message is vague.
The report can show whether the missing fragment belongs to nav.xhtml, a chapter link, a footnote, an endnote, or a backlink.
EPUB error guide
How to handle an RSC_012 missing fragment error by checking the file before the # symbol and the anchor id after it before another KDP upload.
1. Example report output
The useful detail is not just the code. It is the file before the # symbol, the missing fragment after it, and whether the link is navigation, a footnote, or an ordinary section jump.
EPUBCheck message
ERROR(RSC-012): OEBPS/nav.xhtml(18,32): Fragment identifier is not defined.
KDP / Previewer wording
A table of contents, footnote, or internal link points to a missing location.
EPUB Fixer report
Source link OEBPS/nav.xhtml, target file OEBPS/Text/chapter2.xhtml, missing fragment #note-4.
Do this next
Open the target XHTML file and confirm the intended id before adding or renaming an anchor.
Do not do this
Do not add #note-4 to the top of the chapter unless that is where the reader should land.
A renamed heading id can be safe to align. Footnotes and backlinks need context because the wrong anchor can send readers to the wrong note.
2. Next step
RSC_012 is usually an anchor problem. Split the target into file path and fragment before deciding whether to scan, inspect manually, or send it back to the formatter.
Upload scan
The report can show whether the missing fragment belongs to nav.xhtml, a chapter link, a footnote, an endnote, or a backlink.
Manual check
Open the target XHTML file and confirm the exact reading location before adding or renaming an id.
Formatter handoff
Send the source file, target file, missing fragment, and surrounding heading or note text so the source project can be fixed cleanly.
3. Concrete path example
The file can exist while the anchor after the # is still missing.
Message: ERROR(RSC-012): OEBPS/nav.xhtml points to Text/chapter2.xhtml#section-5 Report shows: file exists, missing id section-5 Possible id: sec-5 Fix: use sec-5 only if it is the same reading location
Only use sec-5 if it is the intended heading. Do not point the link to a different section just because the name looks similar.
Quick decision
The file before the # and the fragment after it must both be checked. The same missing id can be harmless in a section link and risky in a footnote loop.
Scan first
Scan the EPUB to locate the source link and target XHTML file, then decide whether the missing fragment is a heading, TOC target, footnote, or backlink.
Safe fix
A renamed heading id or moved body id can be repaired when the target is unique and the reading location stays the same.
Manual review
Footnotes and repeated section titles are easy to mis-target. Do not create a new id unless you know exactly where the reader should land.
Start here
RSC_012 is easy to misread as a missing chapter. Usually the XHTML file exists; the problem is the anchor after the #. Check those two parts separately before changing nav or footnote links.
The target XHTML file exists, but the exact anchor inside that file does not. This is different from a missing file error: the path before the # resolves, while the fragment after the # points to an id that is absent, renamed, duplicated, or located in a different file.
EPUB Fixer can repair a fragment only when there is one clear target, such as a moved body id, an obvious heading id mismatch, or a unique nearby anchor in the same XHTML file. A safe repair should keep the link in the same reading context and pass EPUBCheck again after the change.
Split the broken link into two parts: the file path before # and the anchor name after #.
Footnotes, endnotes, repeated headings, and duplicated section titles often require manual review because choosing the wrong anchor can send readers to the wrong note, chapter section, or backlink. Do not create a new anchor if you cannot prove where the reader should land.
Common situations
RSC_012 always points after a # symbol, but the source of that link determines the risk.
The chapter file exists, but the heading id changed during export or editing.
Update the TOC link only when the intended heading is unique in that chapter.
The note may have been renumbered, moved to an endnotes file, or split into another chapter.
Check both the forward note link and the return backlink before changing ids.
The note itself can exist while the return target no longer exists in the chapter.
Do not point every backlink to the chapter top; choose the original reading location or review manually.
Export tools can generate similar ids for repeated headings such as Introduction, Notes, or Chapter Summary.
Stop for manual review unless one target is clearly tied to the source link.
Some exports leave links such as chapter.xhtml#bodymatter after the chapter body id was removed or renamed.
Check the target file for the current body or heading id. Do not replace it with the first id you find.
RSC_012: Fragment identifier is not defined.
KDP, Kindle Previewer, or EPUBCheck finds a link such as chapter.xhtml#note-4, chapter2.xhtml#section-5, or nav.xhtml#toc, but the target XHTML file has no matching id attribute for the fragment after the # symbol.
What it means
The target XHTML file exists, but the exact anchor inside that file does not. This is different from a missing file error: the path before the # resolves, while the fragment after the # points to an id that is absent, renamed, duplicated, or located in a different file.
This often happens after headings, footnotes, endnotes, or TOC entries are edited and the old id remains in a nav file, NCX file, chapter link, or footnote backlink. Export tools can also regenerate heading ids while preserving older links from a previous EPUB build.
Before you edit
A safe repair keeps the reader in the same place the original link intended. That is why footnotes, endnotes, repeated headings, and backlinks need more caution than ordinary section anchors.
Why KDP checks it
EPUBCheck checks EPUB 2 and EPUB 3 files against the official rules and reports package, markup, link, and file-reference problems.
The OPF file is the EPUB's map: metadata, file list, reading order, and navigation wiring. KDP and EPUBCheck use it to decide whether the book package is coherent.
Can this be fixed safely?
EPUB Fixer can repair a fragment only when there is one clear target, such as a moved body id, an obvious heading id mismatch, or a unique nearby anchor in the same XHTML file. A safe repair should keep the link in the same reading context and pass EPUBCheck again after the change.
Footnotes, endnotes, repeated headings, and duplicated section titles often require manual review because choosing the wrong anchor can send readers to the wrong note, chapter section, or backlink. Do not create a new anchor if you cannot prove where the reader should land.
Before: nav.xhtml links to chapter2.xhtml#section-5, but chapter2.xhtml contains id="sec-5" on the intended heading. After: the link is updated only if that is the single safe match. Before: a footnote backlink points to #fnref12 but the chapter has several note references; that should stop for manual review.
Ready to retry?
The scan helps show whether the broken fragment is in a TOC entry, a footnote backlink, an endnote, or an ordinary chapter link, which changes the safe next step.
Upload EPUB to scanFAQ
It means the EPUB link points to a file that exists, but the anchor after the # symbol does not exist inside that file. This often affects table of contents links, footnotes, endnotes, or heading links.
Compare the link target with the id values inside the target XHTML file. Start with the file path before the # symbol, then check the fragment against headings, footnotes, and backlinks. A safe fix requires one clear matching anchor; otherwise the link may send readers to the wrong section.
Editing tools can rename headings, footnotes, or section ids while old links remain in the nav, NCX, or chapter files. The file path still works, but the specific fragment target is gone.
Only when there is a single obvious replacement anchor, such as a moved body id or a simple heading id mismatch. Footnotes and duplicated headings usually need manual review.
A TOC or nav file can point to a chapter file and a specific heading id. If the chapter file still exists but the heading id changed during export, the TOC entry becomes a broken fragment even though the chapter itself is present.
Only when you know the exact reading location the link should target. Adding a new id just to satisfy the validator can create a valid but misleading link, especially for footnotes, endnotes, and repeated headings.
Footnotes often have forward links and backlinks. If the wrong id is chosen, the EPUB may validate while readers jump to the wrong note or cannot return to the text.