Skip to content
Marcos Caceres edited this page Mar 27, 2026 · 18 revisions

canonicalURI

Type: string | "edDraft" | "TR" Default: undefined

Sets the <link rel="canonical"> URL for the document, helping search engines identify the authoritative version.

Basic usage

var respecConfig = {
  shortName: "payment-request",
  canonicalURI: "TR",
};
var respecConfig = {
  canonicalURI: "edDraft",
};
var respecConfig = {
  canonicalURI: "https://respec.org/docs/",
};

Keyword values

Value Generates
"TR" https://www.w3.org/TR/shortName/
"edDraft" The value of edDraftURI

Notes

  • Use "TR" for the published version to ensure search engines index the stable W3C TR/ URL rather than the Editor's Draft
  • Omit for documents where canonicalization isn't needed (e.g. unofficial drafts)

Guides

Configuration options

W3C Configuration options

Linting rules

Internal properties

Handled by ReSpec for you.

Special <section> IDs

HTML elements

Custom Elements

HTML attributes

CSS Classes

Special properties

Clone this wiki locally