Changes

Jump to navigation Jump to search
m
update /doc
{{Documentation subpage}}
<noinclude>{{pp-semi|small=yes}}</noinclude>
{{high-risk| 222562 }}
<!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])-->
<!-- Redirect regex: [Dd]ead[ _]+link|[Dd]l|[Dd]eadlink|[Cc]leanup-link|[Dd]l-s|404|[Bb]roken[ _]+link|[Bb]rokenlink -->
{{Template shortcut|404|dl|dead|Broken link|deadlink}}

== Usage ==
Editors occasionally encounter [[WP:Linkrot|dead link]]s either within a paragraph or a [[WP:CITE|reference citation]].

Before considering whether to use the {{tl|dead link}} template it is often useful to make a search for an [[Wikipedia:LR#Internet archives|archive copy]] of the dead link and thereby avoid using the tag altogether. All {{tl|cite}} templates have the facility for adding {{para|archivedate}} and {{para|archiveurl}} parameters for linking to an archive copy. Non-{{tl|cite}} citations can use {{tl|webarchive}}.

Using {{Tl|Dead link}} will place a note by the URL and add the article to one of the [[:Category:Articles with dead external links]] categories.

Append this template '''directly after''' the link (after the link code's terminating <code>]</code> if you are using [[wikitext]]), or, if you are using a {{tl|cite}} template, '''directly after''' the {{tl|cite}} transclusion (not inside it), but inside the reference, if any, i.e. before the <code></ref></code>, in all cases leaving the original link intact:

: <code><nowiki><ref>{{cite web|url=http://www.example.org|title=The Example Website|accessdate=22 September 2012}}</nowiki>'''<nowiki>{{Dead link|date=September 2012}}</nowiki>'''<nowiki></ref></nowiki></code>

Not doing so might hinder detection by automated tools. If the citation contains multiple URLs (e.g. chapterurl and url) in a template, and only one is broken, you can use <code><nowiki><!-- hidden text --></nowiki></code> to explain which one is broken.

If the article uses [[WP:Footnotes|clickable footnotes]], then this tag should be placed just before the <code>&lt;/ref&gt;</code> that contains the dead link. The notice will then correctly appear in the reference section instead of in the body of the text, and so [[WP:Link rot]] bots can properly find and fix the link.

Avoid using this template when the reference is fully adequate without the link. In this case, simply remove the link. For example, if a <code>{{tl|cite journal}}</code> template is used with a [[Digital object identifier|DOI]], remove the {{para|url}} parameter.

;Common form (with current date)
{{Tlx|Dead link|date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}

=== Optional parameters ===
; <code>url</code>: Provides a history of the linked page via the [[Wayback Machine]]. Set '''only''' if history actually exists, as otherwise it is misleading to users and editors.
; <code>date</code>: The date parameter consists of the full English name of the current month with initial capital, a space, and the year, not full dates; e.g., "January 2013", but not "jan13". ''Any deviation from these two rules will result in an "invalid date parameter" error''.
; <code>bot</code>: [[WP:BOTS|Bot accounts]] specify the <code>|bot=</code> parameter as a sign that the tag was added by an automated process. Set as <code>bot=<bot name></code>.
; <code>fix-attempted</code>: Set this to "yes" if you have tried unsuccessfully to find an archived copy, or a copy with a different URL. This will put the page in [[:Category:Articles with permanently dead external links]]. Note that a link that is not in the [[Internet Archive]] (Wayback machine) [[WP:DEADREF|can very often be found]], e.g. by a search for the full title, in quotes, on the original Web site or the Internet at large, if the Wayback machine fails.

'''Notes''':
* The date-substitution template may be used to automatically generate the date, e.g., <code><nowiki>{{Dead link|{{subst:DATE}}}}</nowiki></code>. See [[Help:Substitution]] for more information.
* The <code>date=</code> parameter need not be added by the editor: if not entered, a [[Wikipedia:Bots|bot]] will soon add it.

== Examples ==
* <code><nowiki><ref>{{cite web |url=http://www.example.org |title=Web page title |accessdate=22 September 2012}} {{Dead link |date=September 2012}}</ref></nowiki></code> <br />→ <span style="background:white"><ref>{{cite web |url=http://www.example.org |title=Web page title |accessdate=22 September 2012}} {{Dead link |date=September 2012}}</ref></span>
* <code><nowiki><ref>{{cite news |title=Sorrell accuses Murdoch of panic buying |author=Plunkett, John |url=http://media.guardian.co.uk/site/story/0,14173,1601858,00.html |newspaper=[[The Guardian]] |date=27 October 2005 |accessdate=22 September 2012}} {{Dead link}}</ref></nowiki></code> <br />→ <span style="background:white"><ref>{{cite news |title=Sorrell accuses Murdoch of panic buying |author=Plunkett, John |url=http://media.guardian.co.uk/site/story/0,14173,1601858,00.html |newspaper=[[The Guardian]] |date=27 October 2005 |accessdate=22 September 2012}} {{Dead link}}</ref></span>

<references />

=== Caveats ===
* Avoid using free links (e.g. <code><nowiki>http://www.example.org/{{Dead link}}</nowiki></code>) as software unable to handle templates may read an incorrect link. Add brackets if necessary.
* Avoid complicated formatting. Nesting inside a template is generally not supported well.
* Avoid using <kbd>[ ] { | } < ></kbd> characters between the end of the external link and <nowiki>{{Dead link}}</nowiki>, as they are often used to format text.

== TemplateData ==
{{TemplateDataHeader}}
<templatedata>
{
"description": "A template to indicate that the preceding URL is dead",
"params": {
"date": {
"label": "Month and year",
"description": "The month and year the URL was found to be dead, like \"June 2013\"",
"type": "string",
"autovalue": "{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}",
"suggested": true
},
"bot": {
"label": "Bot name",
"description": "The name of the bot used to identify the dead link (not used by regular editors)",
"type": "wiki-user-name"
},
"url": {
"label": "Wayback URL",
"description": "The dead URL, used only if there is a Wayback Machine archive",
"type": "url"
},
"fix-attempted": {
"label": "Fix attempted",
"description": "Used to indicate that no archive copy is available",
"type": "boolean",
"example": "yes"
}
},
"format": "inline"
}
</templatedata>

== See also ==
* {{Tl|Full citation needed}} (inline) to be used when a reference suffers from a more severe problem than a mere [[error 404|broken link]]
* {{Tl|Citations broken}}
* {{Tl|Cleanup bare URLs}} header
* {{Tl|Closed access}} and {{Tl|Open access}} citation flags
* {{Tl|Registration required}} citation flag
* {{Tl|Subscription or libraries}} citation flag for when a subscription or library access may be required
* {{Tl|Subscription required}} citation flag
* {{Tl|Webarchive}}, replaces deprecated {{Tl|Wayback}}, {{Tl|WebCite}}, {{Tl|memento}} and {{Tl|Cite additional archived pages}}
* [[WP:DEADREF|What to do when a reference link goes dead]]

=== Dead link tools ===
* [[User:Dispenser/Checklinks|Checklinks]]
* [[User:DeadLinkBOT|DeadLinkBOT]]
* [[User:WebCiteBOT|WebCiteBOT]]

{{Inline cleanup tags}}

<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!--Categories below this line, please; interwikis at Wikidata-->
[[Category:External link maintenance templates]]
[[Category:Inline citation cleanup templates]]
}}</includeonly>
Anonymous user

Navigation menu