Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

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.

share|improve this question
If broken section links aren't being automatically repaired by a Wikipedia bot, there must be some other way to solve this problem. –  Anderson Green Oct 1 '12 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/… –  Anderson Green Oct 1 '12 at 17:01
Then maybe you should delete this question? –  svick Oct 1 '12 at 18:42
I don't think it's exactly a duplicate, although it is relevant. –  Anderson Green Oct 1 '12 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. –  Anderson Green Jan 5 '13 at 17:50
add comment

1 Answer

up vote 3 down vote accepted

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.

share|improve this answer
Surprisingly, the Anchor template only works properly when there are no spaces in the template's parameter. Spaces must instead be replaced with underscores. –  Anderson Green Jan 6 '13 at 5:29
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. –  Asa Jan 6 '13 at 7:15
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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