Wikipedia:Citing sources
Examples:
Internet Archive has billions of archived web pages. See Wikipedia:Using the Wayback Machine.
archive.today See Wikipedia:Using archive.today
The UK Government Web Archive (https://www.nationalarchives.gov.uk/webarchive/) preserves 1500 UK central government websites.
If multiple archive dates are available, try to use one that is most likely to be the contents of the page seen by the editor who entered the reference on the |access-date=. If that parameter is not specified, a search of the article's revision history can be performed to determine when the link was added to the article.
For most citation templates, archive locations are entered using the |archive-url=, |archive-date= and |url-status= parameters. The primary link is switched to the archive link when |url-status=dead. This retains the original link location for reference.
If the web page now leads to a completely different website, set |url-status=usurped to hide the original website link in the citation.
Note: Some archives currently operate with a delay of ~18 months before a link is made public. As a result, editors should wait ~24 months after the link is first tagged as dead before declaring that no web archive exists. Dead URLs to reliable sources should normally be tagged with {{dead link|date=September 2024}}, so that you can estimate how long the link has been dead.
Bookmarklets to check common archive sites for archives of the current page:
Archive.org
javascript:void(window.open('https://web.archive.org/web/*/'+location.href))
archive.today / archive.is
javascript:void(window.open('https://archive.today/'+location.href))
Mementos interface
javascript:void(window.open('https://www.webarchive.org.uk/mementos/search/'+encodeURIComponent(location.href)+'?referrer='+encodeURIComponent(document.referrer)))
Remove convenience links: If the material was published on paper (e.g., academic journal, newspaper article, magazine, book), then the dead URL is not necessary. Simply remove the dead URL, leaving the remainder of the reference intact.
Find a replacement source: Search the web for quoted text, the article title, and parts of the URL. Consider contacting the website/person that originally published the reference and asking them to republish it. Ask other editors for help finding the reference somewhere else, including the user who added the reference. Find a different source that says essentially the same thing as the reference in question.
Remove hopelessly-lost web-only sources: If the source material does not exist offline, and if there is no archived version of the web page (be sure to wait ~24 months), and if you cannot find another copy of the material, then the dead citation should be removed and the material it supports should be regarded as unverified if there is no other supporting citation. If it is material that is specifically required by policy to have an inline citation, then please consider tagging it with {{citation needed}}. It may be appropriate for you to move the citation to the talk page with an explanation, and notify the editor who added the now-dead link.

Text–source integrity: When using inline citations, it is important to maintain text–source integrity. The point of an inline citation is to allow readers and other editors to see which part of the material is supported by the citation; that point is lost if the citation is not clearly placed. The distance between material and its source is a matter of editorial judgment, but adding text without clearly placing its source may lead to allegations of original research, of violations of the sourcing policy, and even of plagiarism.

Keeping citations close: Editors should exercise caution when rearranging or inserting material to ensure that text–source relationships are maintained. References should not be moved if doing so might break the text–source relationship.
If a sentence or paragraph is footnoted with a source, adding new material that is not supported by the existing source to the sentence/paragraph, without a source for the new text, is highly misleading if placed to appear that the cited source supports it. When new text is inserted into a paragraph, make sure it is supported by the existing or a new source. For example, when editing text originally reading

The sun is pretty big.

Notes

an edit that does not imply that the new material is supported by the same reference is

The sun is pretty big. The sun is also quite hot.

Notes

Do not add other facts or assertions into a fully cited paragraph or sentence:

N
The sun is pretty big, but the moon is not so big. The sun is also quite hot.

Notes

Include a source to support the new information. There are several ways to write this, including:

Y
The sun is pretty big, but the moon is not so big. The sun is also quite hot.

Notes

Citation order: There is no consensus for a specific ordering of citations, and editors should not edit-war over it, nor make mass changes of ordering to suit personal preferences. In particular, references need not be moved solely to maintain the numerical order of footnotes as they appear in the article.

Bundling citations: Sometimes the article is more readable if multiple citations are bundled into a single footnote. For example, when there are multiple sources for a given sentence, and each source applies to the entire sentence, the sources can be placed at the end of the sentence, like this:[4][5][6][7] Or they can be bundled into one footnote at the end of the sentence or paragraph, like this:[4]
Bundling is also useful if the sources each support a different portion of the preceding text, or if the sources all support the same text. Bundling has several advantages:

It helps readers and other editors see at a glance which source supports which point, maintaining text–source integrity;
It avoids the visual clutter of multiple clickable footnotes inside a sentence or paragraph;
It avoids the confusion of having multiple sources listed separately after sentences, with no indication of which source to check for each part of the text, such as this.[1][2][3][4]
It makes it less likely that inline citations will be moved inadvertently when text is re-arranged, because the footnote states clearly which source supports which point.
To concatenate multiple citations for the same content into a single footnote, there are several layouts available, as illustrated below:

Simply using line breaks to separate list items breaches MOS:Accessibility § Nobreaks: "<br /> line breaks ... should not be used." {{Unbulleted list citebundle}} a.k.a. {{Multiref}} was made specifically for this purpose. Some other templates in the same vein are listed at the disambiguation page Template:Multiple references.
Within a given article only a single layout should generally be used, except that inline may always be appropriate for shortened references, often all for the same statement:

In-text attribution: In-text attribution is the attribution inside a sentence of material to its source, in addition to an inline citation after the sentence. In-text attribution may need to be used with direct speech (a source's words between quotation marks or as a block quotation); indirect speech (a source's words modified without quotation marks); and close paraphrasing. It may also be used when loosely summarizing a source's position in your own words, and it should always be used for biased statements of opinion. For certain frequently discussed sources, in-text attribution is always recommended. It avoids inadvertent plagiarism and helps the reader see where a position is coming from. An inline citation should follow the attribution, usually at the end of the sentence or paragraph in question.
For example:

N To reach fair decisions, parties must consider matters as if behind a veil of ignorance.[2] 
Y John Rawls argues that, to reach fair decisions, parties must consider matters as if behind a veil of ignorance.[2] 
Y John Rawls argues that, to reach fair decisions, parties must consider matters as if "situated behind a veil of ignorance".[2] 
When using in-text attribution, make sure it doesn't lead to an inadvertent neutrality violation. For example, the following implies parity between the sources, without making clear that the position of Darwin is the majority view:

N Charles Darwin says that human beings evolved through natural selection, but John Smith writes that we arrived here in pods from Mars.
Y Humans evolved through natural selection, as first explained in Charles Darwin's The Descent of Man, and Selection in Relation to Sex.
Neutrality issues apart, there are other ways in-text attribution can mislead. The sentence below suggests The New York Times has alone made this important discovery:

N According to The New York Times, the sun will set in the west this evening.
Y The sun sets in the west each evening.
It is preferable not to clutter articles with information best left to the references. Interested readers can click on the ref to find out the publishing journal:

N In an article published in The Lancet in 2012, researchers announced the discovery of the new tissue type.[3] 
Y Researchers announced the new tissue type in 2012.[3] 
Simple facts such as this can have inline citations to reliable sources as an aid to the reader, but normally the text itself is best left as a plain statement without in-text attribution:

Y By mass, oxygen is the third most abundant element in the universe after hydrogen and helium.[4]

Dealing with unsourced material: If an article has no references at all, then:

If the entire article is patent nonsense, tag it for speedy deletion using criterion G1.
If the article is a biography of a living person, it can be tagged with {{subst:prod blp}} to propose deletion.