The canon of a work of fiction is "the body of works taking place in a particular fictional world that are widely considered to be official or authoritative; [especially] those created by the original author or developer of the world". Canon is contrasted with, or used as the basis for, works of fan fiction and other derivative works.
When there are multiple "official" works or original media, what material is canonical can be unclear. This is resolved either by explicitly excluding certain media from the status of canon (as in the case of Star Trek and Star Wars), by assigning different levels of canonicity to different media, by considering different but licensed media treatments official and equally canonical to the series timeline within their own continuities' universe, but not across them, or not resolved at all. There is also no consensus regarding who has the authority to decide what is or isn't canon, with copyright holders usually declaring themselves the authorities when they want to erase or retcon materials that were approved by the setting's original creator (with Star Wars again being an example). The use of canon is of particular importance with regard to reboots or re-imaginings of established franchises, such as the Star Trek remake (2009), because of the ways in which it influences the viewer experience.
The official Star Trek website describes Star Trek canon as "the events that take place within the episodes and movies" referring to the live-action television series and films, with Star Trek: The Animated Series having long existed in a nebulous gray area of canonicity. Events, characters and storylines from tie-in novels, comic books, and video games are explicitly excluded from the Star Trek canon, but the site notes that elements from these sources have been subsequently introduced into the television series, and says that "canon is not something set in stone."
During George Lucas' time with the franchise, Star Wars canon was divided into discrete tiers that incorporated the Expanded Universe (EU), with continuity tracked by Lucasfilm creative executive Leland Chee. Higher-tier and newer material abrogated lower-tier and older material in case of contradiction. The live-action theatrical films, the 2008 The Clone Wars TV series and its debut film, and statements by Lucas himself were at the top of this hierarchy; such works invariably superseded EU material in case of contradiction. The EU itself was further divided into several descending levels of continuity. After Disney's acquisition of the franchise, Lucasfilm designated all Expanded Universe material published prior to 25 April 2014 (other than the first six theatrical films and the 2008 The Clone Wars film and TV series) as the non-canonical "Legends" continuity. Material released since this announcement is a separate canonical timeline from the original George Lucas Canon, with all narrative development overseen by the Lucasfilm Story Group.
The makers of Doctor Who have generally avoided making pronouncements about canonicity, with Russell T Davies explaining that he does not think about the concept for the Doctor Who television series or its spin-offs.
The television series The Simpsons has as an example of non-canon material the Treehouse of Horror episodes, a series of Halloween-themed specials with several stories that take place outside the normal continuity of the show.
Several anime television series adapted from manga stories counts with some extra episodes with original stories that are not part of the original manga, often being referred to as "filler episodes", being outside of the canon of their source material.
The canon status of some works by the original writer but not the same publisher, such as "The Field Bazaar", may be debated. This is because copyright used to be exercised by the publisher of the work of literature rather than the author. Campaigning by Victor Hugo led to the Berne Convention which introduced author's rights.
However, sometimes in literature, original writers have not approved works as canon, but original publishers or literary estates of original writers posthumously approve subsequent works as canon, such as The Royal Book of Oz (1921) (by original publisher), Porto Bello Gold (1924) (by estate), and Heidi Grows Up (1938) (by estate).
In film and television this is common that the original writer does not decide canon. In literature, the estate of H. G. Wells authorised sequels by Stephen Baxter, The Massacre of Mankind (2017) and The Time Ships (1995). Scarlett was a 1991 sequel to Gone with the Wind authorised by the estate.
In 2010, the Conan Doyle estate authorised Young Sherlock Holmes and The House of Silk. Sequels to the stories by P G Wodehouse about the butler Jeeves were sanctioned by Wodehouse's estate for Jeeves and the Wedding Bells (2013) by Sebastian Faulks and Jeeves and the King of Clubs (2018) by Ben Schott. The Monogram Murders (2014) by Sophie Hannah is a sequel to Hercule Poirot novels authorised by the Agatha Christie estate.
Fan fiction is almost never regarded as canonical. However, certain ideas may become influential or widely accepted within fan communities, who refer to such ideas as "fanon", a blend of fan and canon. Similarly, the term "headcanon" is used to describe a fan's personal interpretation of a fictional universe.