Manual:Namespace

A namespace is a collection of pages which have content with a similar purpose, i.e. pages where the intended use is the same. Namespaces can be thought of as partitions of different types of information within the same wiki, and keep "real" content separate from user profiles, help pages, etc.

Technical overview
Pages exist within a namespace, and this can be distinguished using the namespace prefix of a page, which forms part of the title of a page, separated with a colon (:).

For example:

The main namespace does not have a prefix. Namespace prefixes can be translated, and aliases can be configured for each. All namespaces also have a "canonical" prefix, which works on all wikis regardless of configuration.

Each namespace has a corresponding namespace index. Within the database, the title is split into namespace index and text title, and this is used for storage in the page.page_namespace and page.page_title columns, among others.

Most namespaces have an associated discussion namespace (or "talk" namespace). All discussion namespaces have odd-integer indices, and the discussion namespace index for a specific namespace with index $$n$$ is $$n + 1$$.

Built-in namespaces
MediaWiki ships with 18 built-in namespaces.

The following 8 namespaces all have associated discussion namespaces.

Note that Project and Help namespaces have no extra functionality compared to Main namespace, and the only thing different about Template namespace pages is the ability to be transcluded without namespace prefix.

2 other namespaces have negative indexes and have special purposes. You cannot create or delete pages in these namespaces, and there are no corresponding discussion namespaces.

Custom namespaces
It is possible to define additional namespaces to group additional classes of page together. This is done using the $wgExtraNamespaces configuration variable.

For a thorough overview, see Manual:Using custom namespaces.