EPUBCheck RSC-030: file URL not allowed
Updated:
EPUBCheck RSC-030 is an error message: “File URLs are not allowed in EPUB, but found "…".” A file: URL points to a file on someone's computer; EPUB does not allow file URLs. Readers cannot reach the author's disk, so the link or image is broken for everyone.
The official message
File URLs are not allowed in EPUB, but found "%1$s".
- Default severity
- Error. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.
- EPUBCheck version
- 5.4.0
%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.
Typical causes
- Links or images that still point to the author's disk, such as file:///C:/Users/… after export.
- Documents exported from a word processor that stored absolute local paths.
How to fix it
- Find the file: URL named in the message.
- Copy the resource into the book folder, add it to the manifest and reference it by a relative path, or remove the reference.
- Validate again.
When it's not this
An http or https URL to a resource that must be inside the EPUB is RSC-006.
Terms used here
Other RSC messages
RSC-029Data URL is not allowed in this context.RSC-031Remote resource references should use HTTPS, but found "…".RSC-028XML documents must be encoded in UTF-8, but … was detected.RSC-032Fallback must be provided for foreign resources, but found none for resource "…" of type "…".RSC-027XML document is encoded in UTF-16. It should be encoded in UTF-8 instead.RSC-033Relative URL strings must not have a query component, but found one in "…".
Sources
- EPUB 3.3, §3.8 File URLs · read
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.