A Wikipedianamespace is a set of Wikipedia pages whosenames begin with a particular reserved word recognized by theMediaWiki software (followed by a colon). For example, in theuser namespace all titles begin with the prefixUser:. In the case of the article (or main) namespace, in which encyclopedia articles appear, the reserved word and colon are absent. (Note: main space articles can optionally include a colon at the beginning with no reserved word, so[[Article]] and[[:Article]] are equivalent. This is usually only necessary for the advanced technique oftranscluding a main space article into a page in another namespace.)
More generally, a Wikipedianamespace is a class of pages that falls under a common type. All pages in theUser namespace, for example, areuser pages, whereasDrafts are in theDraft namespace. This page is in theWikipedia namespace, for information or discussions about the project itself and its policies.
Wikipedia has 30 current namespaces: 14 subject namespaces, 14 corresponding talk namespaces, and 2 virtual namespaces. These are all listed in the box to the right. While surfing Wikipedia, a list of namespaces is available in two clicks: do an empty search, then clickAdvanced under the search box. The list also makes itself available where needed in the dropdown menus of, for example,Special:Prefixindex,Special:Allpages,Special:Recentchanges, andSpecial:Contributions.
The aliasesWP forWikipedia, andWT forWikipedia talk, work for page names in the search box, and making links as well as inclusions. SeeAliases below for other aliases. (The pseudo-namespaces such asH forHelp, andCAT forCategory, are extremely limited. SeePseudo-namespaces below.)
The table on the right shows what number to use when you want to hide pages that are on your watchlist. See:Wikipedia:Hide Pages in Watchlist for details.
Namespaces allow for the organization and separation ofcontent pages fromadministration pages. Namespaces separate data into core sets, those intended for public viewing, and those intended for the editing community. Wikipedia's subject namespaces and their functions are listed below. A brief description is provided, but see the link for more information.
A namespace is sometimes called aspace, for short, as in "Project space". Asubject page and itstalk page form a pair.
User namespace (prefixUser:): contains user pages and other pages created by individual users for their own personal use. Pages under this namespace can still be viewed and modified by others, so do not keep any of your sensitive data here.
Wikipedia namespace orProject namespace (prefixWikipedia:): contains many types of pages connected with the Wikipedia project itself: information, policies, guidelines, essays, processes, discussion, etc.Namespace aliases:WP: orProject:
File namespace (prefixFile:): containsdescription pages for media files (images, videos, and audio files). A link starting with[[File: will display the media at that position on the page instead of showing a wikilink that leads to the specified file description page, so if you want the latter effect, use a link beginning with[[:File: (thecolon trick). Namespace alias:Image:
MediaWiki namespace (prefixMediaWiki:): a namespace containing interface texts, such as the links and messages that appear on automatically generated pages. Pages in this namespace are permanentlyprotected against editing by regular users. For a list of these messages, seeSpecial:AllMessages. (The prefixcannot be shortened to "MW" becausemw is an interwiki prefix. SeeInterwiki links below.)
Template namespace (prefixTemplate:): contains templates – pages that are intended primarily to betranscluded orsubstituted onto other pages to insert standard text or boxes such as infoboxes and navigation boxes.Namespace alias:TM:
Help namespace (prefixHelp:): contains pages which provide help in using Wikipedia and its software, both for users of the encyclopedia and for editors.
Category namespace (prefixCategory:): contains category pages, which are curated lists of related pages and subcategories, along with optional additional text. A link beginning with[[Category: has the effect of adding the page the link appears on to the specified category; it will not result in a wikilink to the category page itself. If you want the latter, use thecolon trick:[[:Category:.
Portal namespace (prefixPortal:): for reader-oriented portals that help readers find articles related to a specific topic, and may contain links to encourage contributions to relevantWikiProjects. See, for example,Portal:Cricket andPortal:Spaceflight.
Draft namespace (prefixDraft:): hosts drafts of new (potential) Wikipedia articles.
TimedText namespace (prefixTimedText:): synchronized subtitles for media files.
MOS namespace (prefixMOS:): contains redirects to subpages ofWP:Manual of Style. Until 2024 this was a pseudo-namespace, but it was turned into a real namespace in 2024 to avoid conflicts with theMooré Wikipedia (with the language codemos:).[1]
The following namespaces previously existed but no longer do:
Flow namespace (prefixTopic:) was a proposed talk page replacement, formerly installed on English Wikipedia byExtension:StructuredDiscussions. It is no longer installed after being rejected by the community.
Education Program namespace (prefixEducation Program:): uninstalled in 2018, and replaced with thePrograms & Events Dashboard.[2][3] However, the namespace was re-added later that year to allow access to old talk pages in the Education program talk: namespace. The namespace was then uninstalled again in 2021 after the remaining talk pages were moved to subpages ofWikipedia talk:Education program archive.
Book namespace (prefixBook:): contained entries for Wikipedia books, collections of articles about one theme, which were used to generate downloadable files or printable documents or order books from PediaPress. In 2017, the online book rendering service was withdrawn, leading to the removal of most links leading to the namespace in 2019. The namespace and its transclusions were still retained in the hope that the WMF would come up with a solution,[4] but in 2021 the namespace was uninstalled after all remaining books were moved to subpages ofWikipedia:Books/archive.
Gadget definition namespace (prefixGadget definition:): installed but never used; see above for more information. Gadget definitions currently use theMediaWiki:Gadgets-definition page.
Analias of a namespace is its namespace. For example,WP: isWikipedia:, and so[[Wikipedia:Page name]] can be abbreviated[[WP:Page name]].SeeAliases below, for a list of aliases, such asWT: forWikipedia talk:.
Apseudo-namespace is an agreement to create redirect pages named that way, each of whichis a shortcut from mainspace toa single page in its namespace.So an alias refers toany page in its namespace, but a pseudo-namespace has far fewer pages than its real namespace.There are a few pseudo-namespace names likeH: forHelp:, andCAT: forCategory:, and these can be discovered below in the sectionPseudo-namespaces.
Each of the above namespaces (but not the virtual namespaces and the former Topic: namespace) has an associatedtalk namespace—these are also known asdiscussion pages. The talk namespaces are designated by appending the wordtalk to the namespace name. For example, the talk namespace associated with the user namespace has the prefixUser talk:. The talk namespace associated with the article namespace isTalk:.
Most of the pages in the talk namespaces are used to discuss changes to the corresponding page in the associated namespace. Pages in theuser talk namespace are used to leave messages for a particular user. The user talk namespace is special in that, whenever a user's talk page is edited, that user will see an orange box saying "You have new messages" on the top of every page that they view until they visit their talk page. By default, logged-in users will seea red notification squareand a small orange box on the top right hand corner of the page; IP users will only see a wide orange box spanning the top of the page. (Minor edits made bybots no longer set off the new message bar. For logged-in users, the new-message bar may be disabled inSpecial:Preferences.)
Note that the prefixWT: expands toWikipedia talk:, just asWP: expands toWikipedia: (seeAliases below). For example, [[WT:Verifiability]] links toWikipedia talk:Verifiability.
Virtual namespaces
In addition to subject namespaces, and their corresponding talk pages, there are two virtual namespaces (without corresponding talk pages) for specialist purposes:
TheSpecial: namespace consists of pages (calledspecial pages) that are created by the software on demand, such asSpecial:RecentChanges. These pages can be linked as usual, as with [[Special:RecentChanges]], except when they have parameters. To use parameters, the full URL must be given as an external link. For example,https://en.wikipedia.org/w/index.php?title=Special:Recentchanges&days=3&limit=10, which returns the last ten changes in the last three days.
You can create aredirect to a Special page, but the redirect will not be followed automatically.
Aliases and pseudo-namespaces are not namespaces in themselves; their main role is to provide handy ways to link to actual namespaces, by providing shortened links.
The main difference between them being the way they work for this purpose; while aliases directly link to namespaces, pseudo-namespaces can only link to other namespaces by using specialistredirect pages in the main namespace calledshortcuts. While aliases are also used for shortcuts, this isn't necessary if the pagename is not shortened.
Pseudo-namespaces all actually reside in main namespace; but a pseudo-namespace calledTranswiki: exists as a pseudo-namespace before being moved to another namespace.
There are seven aliases defined for namespaces, all of which are case-insensitive:
Namespace
Alias
Wikipedia
WP
Project
Wikipedia talk
WT
Project talk
File
Image
File talk
Image talk
Template
TM
These aliases are automatically translated by the Wikipedia servers to the proper namespace prefix. So if a link is made to a page title beginning with one of these aliases, or else entered in the search box or used in a URL in a browser address bar, the alias links to the page with the corresponding true namespace prefix. Hence enteringWP:External links orProject:External links is equivalent to enteringWikipedia:External links; and enteringWT:External links orProject talk:External links is equivalent to enteringWikipedia talk:External links.
An alias cannot be used as the actual namespace in a page title. For example, you cannot create pageWP:123; if tried, the page name is instantly converted toWikipedia:123. Itis, however, possible tochange thedisplayed title on pageWikipedia:123 to make itWP:123 orProject:123.
This is very handy for the creation ofshortcuts. For example, the shortcut for this section isWP:ALIAS, as shown in the right-side box. When the link is clicked, it is automatically translated toWikipedia:ALIAS. At this page is aredirect toWikipedia:Namespace § Aliases. This means that the shortcut goes directly to this section from anywhere on Wikipedia. It can also be entered as aURL in the browser address bar ashttps://en.wikipedia.org/wiki/WP:ALIAS .
Apart from Wikipedia's 24 regular namespaces and their aliases, and 2 virtual ones, there are several title prefixes appearing inshortcut redirects pointing to frequently-referred-to Wikipedia pages. These prefixes are referred to aspseudo-namespaces and include the following:
Pseudo-namespaces are not in any way recognised by the wiki software; they are purely a community custom. Titles in pseudo-namespaces actually belong technically in the main (article) namespace and are treated as such by the software: they are case-sensitive and appear insearch results restricted to the main namespace. An alias is treated like a real namespace, resulting in a search for thepagename in its namespace, but the "pseudo-namespace:pagename" search is in mainspace, not its pseudo-namespace. For example, searching for "H:S" will not searchHelp.
To learn some of these shortcuts, first follow the pseudo-namespace link above, then follow one of the redirects listed on that page. It will take you to the target, where you then notice any{{shortcut}} boxes to the right of the page, which may also list some additional shortcuts to that same area. By observing these steps repeatedly, you can discover ways to shorten your typing. You will use pseudo-namespace names more often if you are an advanced editor, highly active in many namespaces, or constantly linking to pages that have a pseudo-namespace shortcut.
As a final example, everyWikimedia Foundation project has a "Transwiki:" pseudo-namespace (sometimes a real namespace) for importing articles manually. A wiki project that would manually move many pages betweensister projects uses this tag. Redirects/shortcuts are not directly involved here, as described above. Instead, the page title ismoved to "Transwiki:namespace:pagename", and that content is then copied and pasted into a new page name of that temporary title on the target wiki. When it is accepted, the title is then moved out of theTranswiki pseudo-namespace there and becomes a real page name in its respective namespace.
Interwiki andinterlanguage prefixes do not define namespaces, but point to pages in other Wikimedia projects, outside the en.wikipedia.org website. They are mentioned here because they use a namespace-like prefix technique for linking. Examples of interwiki prefixes includew: for Wikipedia;m: (ormeta:) forMeta-Wiki,mw: forMediaWiki, andwikt: forWiktionary. Examples of interlanguage prefixes includeen: for English language,fr: for French language, andde: for German language.
Important points to note:
In the presence of an interwiki prefix and the absence of an interlanguage prefix, the link will be to a specified project in the current language. So[[w:Internet]] links to "Internet" on the English Wikipedia, if the link is on any English-language Wikimedia project.
In the presence of an interlanguage prefix and the absence of an interwiki prefix, the link will be to a specified language in the current project. So[[:en:Internet]] will link to "Internet" on the English Wikipedia, if the link is on a Wikipedia project in any language.
When making links to other language Wikipedias, add an initial colon if you want the link to appear inline rather than in the skin's sidebar under "Languages"; seeHelp:Colon trick for an explanation. So[[:de:Internet]] is an inline link to "Internet" in the German Wikipedia; but if using an interwiki prefix this is unnecessary, for example[[w:de:Internet]] is the same inline link.
Further examples:
m:Meta:Babel andmeta:Meta:Babel both link to the "Babel" page in the project namespace (Meta:, the 2nd prefix) of Meta-Wiki (m: or meta:, the 1st prefix).
wikt:fr:Discuter:pied/fusion daf links to the "pied/fusion daf" page in the talk namespace (Discuter:, the 3rd prefix) of French (fr:, the 2nd prefix) Wiktionary (wikt:, the 1st prefix).
Interwiki prefixes are not just for Wikimedia projects. For example,Dictionary: is the interwiki link fordict.org (the DICT Development Group). For a complete list of interwiki prefixes, see theinterwiki map andinterwiki table.
As with aliases, it is not possible to create a page with a title beginning with an interwiki or interlanguage prefix. It is also not possible to create redirects to interwiki pages, unless it is asoft redirect.
Case insensitivity
Standard namespace names, aliases and interwiki prefixes are case insensitive. The same applies to the first character after the colon. Hence the following all link to the same page:
The namespace name is a useful variable for searching in and reporting on sets ofpages. It is also used to apply features that configure the sets of pages in one namespace differently from another namespace. Using the namespace name MediaWiki can:
Enable or disable thesubpage feature, per namespace.
Offer arandom article for the mainspace ([[Special:Random]]), or for a namespace[[Special:Random/Namespace]].
Change the functionality of[[wikilink]] if it targets theCategory namespace orFile namespace. Normally wikilinks are activated by the mouse, but[[Category:Pagename]] activates software functionality when thepage is saved, and[[File:Page name]] activates software functionality when thepage is rendered.
Change the functionality of{{pagename}} so that it defaults to the set of pagenames inTemplate.
Tailoredit notices to a particular namespace's edit page, informing an editor of certain aspects about the content of that namespace.
Allowtemplates to behave differently on pages of different namespaces.
The namespace functionality is often visible in the URL, where you will see a namespace number. These are given in the table below.
Subpages are configured for all namespaces except Main, File, MediaWiki and Category namespaces. Subpages are configured in the software by enabling or disabling the subpage feature per namespace. This further extends the function of a namespace by extending the types of pages or topics of pages a namespace can home. For example, talk page/archives are subpages, and they are both namespace searchable and page name searchable from the search box, unlikehistory pages, which are in no namespace. Another example is in the Template namespace where it is routine to put the documentation in a subpage called/doc.
Random pages are enabled, in the default software configuration, only for the mainspace.
Searching and reporting can operate over the entire database, or they can be limited to a namespace, and so they will offer a list of all the namespaces currently configured.Special:WhatLinksHere also offers a list of namespaces.
Programming
The 30 namespaces in the English Wikipedia are numbered for programming purposes. The prefix for each namespace is generated using themagic word{{ns}}, in the form{{ns:xx}}, as shown in the table below.
Namespace variable
Result (namespace name)
Namespace variable
Result (talk namespace name)
{{ns:-2}}
Media
{{ns:-1}}
Special
{{ns:0}}
(main namespace, returns empty string)
{{ns:1}}
Talk
{{ns:2}}
User
{{ns:3}}
User talk
{{ns:4}}
Wikipedia
{{ns:5}}
Wikipedia talk
{{ns:6}}
File
{{ns:7}}
File talk
{{ns:8}}
MediaWiki
{{ns:9}}
MediaWiki talk
{{ns:10}}
Template
{{ns:11}}
Template talk
{{ns:12}}
Help
{{ns:13}}
Help talk
{{ns:14}}
Category
{{ns:15}}
Category talk
{{ns:100}}
Portal
{{ns:101}}
Portal talk
{{ns:118}}
Draft
{{ns:119}}
Draft talk
{{ns:126}}
MOS
{{ns:127}}
MOS talk
{{ns:710}}
TimedText
{{ns:711}}
TimedText talk
{{ns:828}}
Module
{{ns:829}}
Module talk
{{ns:1728}}
Event
{{ns:1729}}
Event talk
Alternative variables are available for most namespaces, for example{{ns:talk}},{{ns:user}}, and{{ns:user_talk}} for{{ns:1}},{{ns:2}} and{{ns:3}}. The portal namespace is numbered in the 100-plus range, as are all MediaWiki nonstandard namespaces. It is also possible to use{{Namespace name}} for this, i.e. "{{Namespace name|711}}" produces "TimedText talk".
All namespaces with a positive number or zero in this list are searchable. Specifically, the Media and Special namespaces are not searchable.
Themagic word{{NAMESPACE}} returns the namespace prefix of the current page. This can be used in combination with other magic words andparser functions to change the appearance oftemplates depending on the namespace in which they are transcluded.
Meta-templates have been created to simplify this process. These include the simple template{{main other}}, and the more complex and versatile{{namespace detect}}.
For information on changing the appearance of a page or template by namespace based on CSS, seeCSS section ofIdentifying namespaces on the MediaWiki help page.