"Referrer" versus "referral" versus "referer"

Which word is correct and what do they mean?

I've seen $_SERVER['HTTP_REFERER'] (PHP), but I have also seen referrer in can I forward “referrer” information to other address? and referral on the Wikipedia article about referral marketing.


Let's start with an example from the "real world". When a doctor refers the patient to a specialist, the doctor is giving this person a referral to a specialist. When the patient then sees the specialist, that specialist could think of the original doctor as the patient's referrer.

So, in my opinion the more suitable HTTP term for the URL that brought the user to the current web page is referrer. It is like if that previous URL gave the user the referral to the current page and is therefore the user's referrer to it.

And referer is just a misspelling of referrer.


Edit:
"Referrer" and "Referral" refers to different things.

"Referrer" is something or somebody who refers.

"Referral" is the act of referring.

A referral occurs when a referrer refers something. Semantic Satiation

"referer" :

Computing Dictionary
referer definition
World-Wide Web
A misspelling of "referrer" which somehow made it into the HTTP standard. A given web page's referer (sic) is the URL of whatever web page contains the link that the user followed to the current page. Most browsers pass this information as part of a request.
(1998-10-19)