Jump to content

Template:Webarchive

From Blunt Wiki

Adds a link to an archived copy of a web page, for example on the Internet Archive's Wayback Machine. Use it in External links sections, or after a bare link, when the original page has gone offline. Works without Lua/Scribunto; needs only the ParserFunctions extension.

Inside citations you do not need this template: use |archive-url= and |archive-date= in Template:Cite web or Template:Cite news instead.

Usage

{{Webarchive |url=ARCHIVE URL |date=ARCHIVE DATE |title=TITLE}}

Examples

Code Result
{{Webarchive |url=https://web.archive.org/web/20160101000000/http://example.com/}} Archived 1 January 2016 at the Wayback Machine
{{Webarchive |url=https://web.archive.org/web/20160101000000/http://example.com/ |title=Example page}} Example page at the Wayback Machine (archived 1 January 2016)
{{Webarchive |url=https://archive.ph/AbC12 |date=2020-05-03}} Archived 3 May 2020 at archive.today
{{Webarchive |url=https://archive.ph/AbC12 |date=2020-05-03 |df=mdy}} Archived May 3, 2020 at archive.today
{{Webarchive |url=https://web.archive.org/web/20190715000000/http://example.com/ |url2=https://archive.ph/AbC12 |date2=2021-01-02}} Archived 15 July 2019 at the Wayback Machine. Additional archives: 2 January 2021.

Typical use in External links:

== External links ==
* [http://example.com/ Official website] {{Webarchive |url=https://web.archive.org/web/20160101000000/http://example.com/}}

Parameters

Parameter Description
url or 1 Required. Full URL of the archived copy.
date Date of the archived copy, e.g. 2020-05-03. For Wayback Machine links the date is read from the URL automatically (the 14-digit number after /web/), so it can be left out. For other archives, add it.
title Link text. When given, the output is "TITLE at SERVICE (archived DATE)".
df Date format: dmy (default, 3 May 2020), mdy (May 3, 2020) or ymd (2020-05-03).
service Name of the archive, if the automatic name is wrong.
url2, date2, url3, date3 Optional additional archive copies.

The archive service is recognised automatically:

URL starts with Shown as
https://web.archive.org / http://web.archive.org the Wayback Machine
https://archive.today, archive.ph, archive.is, archive.li, archive.md archive.today
https://ghostarchive.org Ghost Archive
https://www.webcitation.org WebCite
anything else the website name (e.g. example.org)

If the date cannot be read from a long or unusual Wayback URL, it is simply left out; add |date= to show it.

Pages using the template without a URL are added to the hidden Category:Webarchive template errors.

TemplateData

Link to an archived copy of a web page (Wayback Machine, archive.today, etc.). Use outside citations; inside citations use archive-url and archive-date.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Archive URLurl 1

Full URL of the archived copy.

URLrequired
Archive datedate

Date of the archived copy. Optional for Wayback Machine URLs (read from the URL).

Datesuggested
Titletitle

Link text.

Stringoptional
Date formatdf

dmy (default), mdy or ymd.

Suggested values
dmy mdy ymd
Lineoptional
Archive service nameservice

Override the automatic archive name.

Lineoptional
Second archive URLurl2

no description

URLoptional
Second archive datedate2

no description

Dateoptional
Third archive URLurl3

no description

URLoptional
Third archive datedate3

no description

Dateoptional