Canonical Definition & Meaning

In computer science, canonical refers to the standard state or behavior of an attribute. It is conforming to an accepted rule or procedure. This term has been borrowed from mathematics, where it refers to concepts that are unique and/or natural. For example, the canonical way to organize a file system is as a hierarchy.

The term itself is an adjective derived from the word canon. The English word canon originates from a Greek word meaning a rule or measuring stick. In the early church, the canon was the officially chosen set of scriptures.

While what can be referred to as canonical is limitless, it is commonly used in a few settings:

Canonical in programming

In programming, canonical means according to the rules. Non-canonical means not according to the rules. The terms are used to distinguish whether a programming interface follows a particular standard or precedent or whether it departs from it.

Canonical in IP addressing

When referring to IP addressing, canonical refers to the authoritative host name stored in a DNS database that all IP address aliases resolve to. This is sometimes referred to as a CNAME record. A computer hosting a website must have an IP address in order to be connected to the World Wide Web. The DNS resolves the computer’s domain name to its IP address, but sometimes more than one domain name resolves to the same IP address, which is where the CNAME is useful. A machine can have an unlimited number of CNAME aliases, but a separate CNAME record must be in the database for each alias.

Canonical XML

Canonical XML is a normal form of Extensible Markup Language (XML), which allows designers to create customized tags, enabling the definition, transmission, validation, and interpretation of data between applications and between organizations. Canonical XML is intended to allow relatively simple comparisons of pairs of XML documents for equivalence. It removes non-meaningful differences between the documents.

Canonical Ltd.

Canonical Ltd. is a UK-based, privately held computer software company founded by Mark Shuttleworth created to market commercial support and related services for Ubuntu and related projects.

Canonical model

A canonical model is a design pattern used to communicate between different data formats. It aims to present data entities and relationships in the simplest possible form to integrate processes across various systems and databases. Canonical models are typically used among enterprises to create and distribute a common definition of its entire data unit.


Webopedia Staff
Webopedia Staff
Since 1995, more than 100 tech experts and researchers have kept Webopedia’s definitions, articles, and study guides up to date. For more information on current editorial staff, please visit our About page.

Top Articles

The Complete List of 1500+ Common Text Abbreviations & Acronyms

UPDATED: This article was updated April 6, 2021 by Web Webster   From A3 to ZZZ we list 1,559 text message and online chat abbreviations to...

How to Create a Website Shortcut on Your Desktop

UPDATED: This article was updated April 6, 2021 by Web Webster   This Webopedia guide will show you how to create a desktop shortcut to a...

Windows Operating System History & Versions

The Windows operating system (Windows OS) refers to a family of operating systems developed by Microsoft Corporation. We look at the history of Windows...

What are the 5 Generations of Computers?

UPDATED: This article was updated on April 6, 2021 by Web Webster   Learn about each of the 5 generations of computers and major technology developments...

Random Access Memory (RAM)...

UPDATED: This article Updated April 6, 2021 by Web Webster   Random Access Memory (RAM)...

OEM – original equipment...

UPDATED: This article was updated April 6, 2021 by Web Webster OEM (pronounced as...

Best ERP Software for...

UPDATED: This page was updated April 6, 2021 by Web Webster   Enterprise resource planning...