MediaWiki – Prevent Section Links from Breaking When Renamed

mediawikiwikipedia

On Wikipedia, is it possible to find all links to a specific section? I've noticed that changing the name of a section on a Wikipedia article will often break a large number of links and redirect pages (so that they link to a non-existent section of an article). I'd like to find a way to stop section links from breaking when sections are renamed, so that other editors won't need to manually repair all of the broken links and redirect pages.

Best Answer

Setup a HTML anchor manually using Template:Anchor.

Say that you want to link to a section called "Overview" in an article. Add the template before the heading to make it look like:

{{Anchor|AnyTextYouWant}}
<!-- Note to other editors: Don't change this anchor text -->
== Overview ==

(Of course, the comment line is optional.)

Then make a link to the section as [[Article#AnyTextYouWant]]. The link would not break as long as the anchor text is not changed.