The Importance of HTTP Referers - and Why It Is Spelled Incorrectly

Referer (with one r) provides valuable information for websites and marketers

http://www
A URL. Image courtesy ilco from Stock.xchng

In website design, a referer is an HTTP header field that tells you the URL of the page that someone was on prior to visiting another page. Typically, this means that one page has a link on it that brings a user to another page. That first page (the one with the link) is the referer for the second page. As the owner of that second page (the one that is being linked to), or as a marketer charged with driving qualified traffic to that website, there is great value in this information.

 

When you consider the marketing and outreach efforts that you do for a website, you want to know which of those efforts are working and which ones are not.  This will allow you to make smarter decisions as to where you invest your money for future marketing efforts or which websites to partner with from a traffic generation standpoint. Referer information will tell you which other websites are sending traffic to your site. Now you just need to determine how you will use that data!

Using Referer Data

If I am marketing a website and spending money or time (or both) partnering with other sites, I wanted to know what kind of traffic those relationships are generating. Referer data can tell me this. If a company is asking to increase the money you spend with them, but they are not sending you any traffic, you have data to back up a decision to discontinue that relationship - or, at the very least, to not increase it.

On the flip side, if you look at the referer data and see a certain site really sending you lots of traffic, that may be the ammunition you need to justify a bigger investment.  If your company has a management team who makes these decisions, this data will help them better allocate their marketing and partnership dollars.

 if you are a contractor suggesting partnerships for others, this data can work the same way and help you make better recommendation that will pay dividends for your customers.

Referer data can be found in Google Analytics as well as in other site analytics programs. 

So Why Do Web Designers Spell 'Referrer' Wrong?

When Philip Hallam-Baker proposed adding a field to the HTTP specification to track where websites were linking from, he called it the “referer” and it was included in the RFC-1945 standards document. These days the one-r spelling is used arguably more than the more historically correct two-r method.

Bear in mind that if you're trying to access the referrer information on your website programmatically, you will, in most cases, need to use the one-r spelling. This is because that is how it is defined in the specification.Yes, it is spelled incorrectly, but the spelling stuck in the spec so that is what we have to deal with today.

For example, to display the referrer information in PHP, you would write:

<?php
echo $HTTP_REFERER;
?>

To add a nice dose of confusion to the equation here - if you were in JavaScript and you wanted to display the referring site, you would write:

<script>
document.write(document.referrer);
</script>

Wait, What?

That's right - the same concept spelled two different ways! In the DOM, the term is spelled correctly with two r's.  It may seem confusing at first, but after a while, you grow used to this reality and it becomes just another of the quirks of this profession of web design!

Get more information about the HTML referer: What is a Referer | Why is Referrer Spelled "Referer" in Web Devlopment? | What is My Referer | Test Your Browser for the Referer | How to Use the Referer on Web Pages | How and Why to Hide Referer Information | What is Referer Spam | How to Block Referer Spam | What is Referer Spoofing? | What is the rel=noreferrer Attribute | What is the DOM referrer Object

Original article by Jennifer Krynin. Edited on 12/13/16 by Jeremy Girard.