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.

  • If broken section links aren't being automatically repaired by a Wikipedia bot, there must be some other way to solve this problem. Oct 1, 2012 at 16:57
  • This turned out to be a duplicate of a question that I asked previously, but it wasn't even suggested as a duplicate: webapps.stackexchange.com/questions/28536/… Oct 1, 2012 at 17:01
  • Then maybe you should delete this question?
    – svick
    Oct 1, 2012 at 18:42
  • I don't think it's exactly a duplicate, although it is relevant. Oct 1, 2012 at 22:39
  • @svick Actually, it turns out that the questions are not exact duplicates. One of them is about preventing section links from breaking, while the other is about automatically repairing broken section links. Jan 5, 2013 at 17:50

1 Answer 1


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:

<!-- 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.

  • Surprisingly, the Anchor template only works properly when there are no spaces in the template's parameter. Spaces must instead be replaced with underscores. Jan 6, 2013 at 5:29
  • 1
    That's no surprise, as the HTML specification disallows space characters in the id attribute. Also notice that for ==Section names==, MedaWiki automatically takes care of the spaces by replacing it with underscores. But when you're using the Anchor template, you have to take care of this limitation by yourself. I've noticed that the template documentation says that white spaces are not a problem. Maybe the documentation is wrong.
    – Asahiko
    Jan 6, 2013 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.