55

First of all, I'm speaking of webpage referral.

Second, let me quote Wikipedia:

The misspelling referer originated in the original proposal by computer "scientist" Phillip Hallam-Baker to incorporate the field into the HTTP specification.[1] The misspelling was set in stone by the time of its incorporation into the standards document Request for Comments (RFC) 1945; document co-author Roy Fielding has remarked that neither "referrer" nor the misspelling "referer" were recognized by the standard Unix spell checker of the period.[2] "Referer" has since become a widely used spelling in the industry when discussing HTTP referrers; usage of the misspelling is not universal, though, as the correct spelling of "referrer" is used in some web specifications such as the Document Object Model.


[1] Hallam-Baker, Phillip. "Re: Is Al Gore The Father of the Internet?" alt.folklore.computers, 2000-09-21
[2] Fielding, Roy. "Re: Referer: (sic)." HTTP-wg, 1995-03-09

It seems even the W3C isn't completely consistent:

  1. http://validator.w3.org/check?uri=referer - works
  2. http://validator.w3.org/check?uri=referrer - fails
  3. http://jigsaw.w3.org/css-validator/check?uri=referrer - works

What is the correct spelling to use (referer or referrer), either in general or specific situations?

1

2 Answers 2

35

When referring to the the information that is made available as REFERER, then the 3R version is correct. When referring to pretty much anything else, the 4R version would be preferred. Thus:

The REFERER URL is sent by the browser to indicate which site contained the information that encouraged the user to visit this site. However, when a real estate agent receives a referral, the person who gives the referral is the referrer.

3
  • 8
    The actual header is called "HTTP_REFERER" which must be spelled that way in order to be recognized by computer programs. All other uses (including documentation) should use the proper spelling, in my opinion. Commented Oct 14, 2013 at 15:16
  • 7
    The header is called "Referer" (case-insensitive). The PHP framework the value of this header to a variable called HTTP_REFERER.
    – yincrash
    Commented Jun 8, 2014 at 5:03
  • 2
    I agree. "Referer" (3 Rs) implicitly refers to the HTTP Request Header of the same name. Using "Referrer" (4 Rs) in this context (as some still do unfortunately) actually becomes confusing, since you then need to make a special case for when you actually write the code, which increases the chance for error.
    – MrWhite
    Commented Apr 28, 2015 at 0:24
5

Wiki

The misspelling of referrer originated in the original proposal by computer scientist Phillip Hallam-Baker to incorporate the field into the HTTP specification. The misspelling was set in stone by the time of its incorporation into the Request for Comments standards document RFC 1945

So the correct version is always 4R: referrer

But:

"Referer" has since become a widely used spelling in the industry when discussing HTTP referrers; usage of the misspelling is not universal

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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