Configure Interwiki Links
Last modified by Eleni Cojocariu on 2026/09/11 22:50
Steps
An Interwiki link reaches a page of another website through a short alias, so that authors write interwiki:wikipedia:Interwiki_links instead of the full address. The aliases are defined once for the whole instance, in the xwiki.properties configuration file.
- Stop the XWiki instance.
- Open xwiki/WEB-INF/xwiki.properties, find the rendering.interWikiDefinitions block and add one uncommented line per alias:
rendering.interWikiDefinitions = wikipedia = https://en.wikipedia.org/wiki/ rendering.interWikiDefinitions = jira = https://jira.xwiki.org/browse/ - Restart the XWiki instance, then write the links in a page, as
[[label>>interwiki:alias:reference]]:* [[Interwiki links>>interwiki:wikipedia:Interwiki_links]] * [[XWIKI-24689>>interwiki:jira:XWIKI-24689]] - Save the page and check that each link reaches its site. XWiki appends the reference to the alias's address, with nothing in between, so the first link above is served by
https://en.wikipedia.org/wiki/Interwiki_links:
FAQ
What happens when a link uses an alias that is not defined?
The link is rendered with the reference alone as its address, so it points inside the wiki instead of the external site. Nothing warns the author, so check a new alias with a real link.
Where does the alias end and the reference begin?
At the first colon: in interwiki:jira:XWIKI-24689 the alias is jira and everything after it is the reference, further colons included.
Does the address of an alias need a trailing separator?
Yes. The reference is appended as it is, so the address has to end with the / or the ? the site expects.
Related
- XWiki Syntax Guide, which gives the link syntax of every supported XWiki Syntax.