# EPUBCheck OPF-006: invalid URI for a prefix, how to fix it

Source: https://epubcc.com/epubcheck/opf-006/ (updated 2026-11-04)

EPUBCheck OPF-006 is an error message: “Invalid prefix declaration: URI "…" is not a valid URI.” The URI given for a prefix in the prefix attribute is not a valid URI. Properties that use the prefix expand to that URI, so an invalid value makes them meaningless to reading apps and validators.

- Official message (EPUBCheck 5.4.0): Invalid prefix declaration: URI "%1$s" is not a valid URI.
- Default severity: Error

## Typical causes

- A typo in the URI, such as a missing colon after http or a space inside the address.
- Text that is not a URI, such as a vocabulary name, written where the URI should be.
- Two mappings run together so that the next prefix is read as part of the previous URI.

## How to fix it

1. Find the mapping EPUBCheck names in the prefix attribute of the package element.
2. Replace the value with the vocabulary's published address, copied exactly from its documentation.
3. Write each mapping as the prefix name, a colon, one space and the vocabulary URI, and separate mappings with whitespace, for example prefix="ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/ foaf: http://xmlns.com/foaf/spec/".

## When it's not this

If the prefix has no URI at all, that is OPF-005, not OPF-006.

## Sources

- EPUB 3.3, §D.1.4 The prefix attribute: https://www.w3.org/TR/epub-33/#sec-prefix-attr (read 2026-11-04)

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