# OPF-070: invalid collection role URL, how to fix it

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

EPUBCheck OPF-070 is a warning message: “Custom collection role "…" is an invalid URL.” A collection element's role is written as a URL, but the URL is not valid. Custom collection roles must be absolute URLs; built-in roles such as index are plain names.

- Official message (EPUBCheck 5.4.0): Custom collection role "%1$s" is an invalid URL.
- Default severity: Warning

## Typical causes

- A typo in the URL, such as a missing colon or a space.
- A relative path or a plain word mixed with URL syntax.
- A role copied from an old registry with a broken address.

## How to fix it

1. Read the role EPUBCheck quotes.
2. If it is meant to be a custom role, correct it to a full, valid URL.
3. If you meant a built-in role, write the plain name instead; remove the collection if nothing uses it.

## When it's not this

If the URL is valid, the role is accepted; the content rules of specific collections (index, preview, dictionary) have their own codes.

## Sources

- EPUB 3.3, §5.8.1 The collection element: https://www.w3.org/TR/epub-33/#sec-collection-elem (read 2026-11-04)

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