Skip to content
EPUBCheck · Resources and references

EPUBCheck RSC-020: invalid URL syntax in a link

Updated:

EPUBCheck RSC-020 is an error message: “"…" is not a valid URL (…).” A URL in the EPUB is not syntactically valid. Reading apps may fail to follow the link or load the resource, and the message gives the URL and the reason in brackets.

The official message

"%1$s" is not a valid URL (%2$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

  • Unencoded spaces or other characters that must be percent-encoded in a URL.
  • Backslashes used as path separators (a Windows habit) instead of forward slashes.
  • A typo in the scheme part of an absolute URL (a link whose scheme is well formed but not registered is HTM-025 instead).

How to fix it

  1. Find the URL named in the message.
  2. Percent-encode spaces as %20 and other reserved characters, and use forward slashes.
  3. Or rename the file so its URL needs no encoding, then validate again.

When it's not this

If the URL is valid but the file it names is missing, that is RSC-007.

Terms used here

Other RSC messages

  • RSC-019 EPUBs with Multiple Renditions should contain a META-INF/metadata.xml file.
  • RSC-017 Warning while parsing file: …
  • RSC-016 Fatal Error while parsing file: …
  • RSC-024 Informative parsing warning: …
  • RSC-015 A fragment identifier is required for svg use tag references.
  • RSC-025 Informative parsing error: …

Sources

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.

FAQ

What does EPUBCheck RSC-020 mean?

EPUBCheck RSC-020 is an error message: “"…" is not a valid URL (…).” A URL in the EPUB is not syntactically valid. Reading apps may fail to follow the link or load the resource, and the message gives the URL and the reason in brackets.

Is RSC-020 an error?

RSC-020 is reported as error by default. 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.

PDF to EPUB tools

Every tool uses the same engine and starts with a free 5-page sample.