What Is a Referrer?

Who is driving visits to your site

Man whispering in woman's ear as she is smiling

Tax i/ Getty Images

An HTTP referrer, often simply referred to as the referrer, is any source online that drives visits and visitors to your website. These may include:

You may see http referrers as http referers. Both of these terms are correct. The http referer misspelling was introduced in the original iteration of this command and it stuck.

Whenever someone visits your site, one of the pieces of information recorded is where that person came from. This is usually in the form of the URL of the page that they were on when they came to your page — for instance, the page they were on when they selected a link that then brought them to your site. If you know that information, you can often go to the referring page and see the link they clicked or tapped on to get to your site. This log is called a referrer log.

Technically, even offline sources like print advertisements or references in books or magazines are referrers, but rather than listing a URL in the server referrer log they are listed as “-” or blank. That obviously makes those offline referrers harder to track (These is a trick for this, which we will present later in this article). Typically. when a web developer uses the term “referrer” they are referencing online sources — specifically those sites or services that are referenced in the referrer log.

Why is this information important? By analyzing where your traffic is coming from, you will get an understanding of what is working for your site from a marketing standpoint and which avenues may not currently be paying off. This will help you better allocate your digital marketing dollars and the time you invest in certain channels. For instance, if social media is really driving lots of traffic for you, you may decide to double down on your investments in those channels and do more on Facebook, Twitter, Instagram, etc. On the opposite end the spectrum, if you have an advertising relationship with other sites and those ads are not generating any traffic, you may decide to cut off those marketing campaigns and use the money elsewhere. Referrer information helps you make better choices when it comes to website strategy.

Tracking Referrers Is Harder Than It Seems

You may think that because referrers are recorded in the server log (combined log format) of most web servers that they would be easy to track. Unfortunately, there are some big hurdles to overcome to do this:

  • Search engines provide information in their referring URL such as search terms used or the directory section the customer was in. In some cases, that search term information is not even transmitted due to security concern. This means that the URL is usually a lot more complicated than simply
  • On the other extreme, email links and links from software may not provide much information at all on the referring URL. (In fact, some software and email clients deliberately mask the referrer, so that you can’t track them.) To get around this, when doing email marketing, you should include something in the URL that identifies it as an email or software link. For example:
    This also works for links inside software. But like the search engine referrals, you will then have to parse that information from your logs.
  • This same trick of using a URL unique to a campaign can be used for those aforementioned offline sources (print ads, radio, etc.). If you use a URL like http://webdesign.lifewire.com/magazine-name, and you only use that URL for one specific magazine, you know that any traffic to that page (which you can find in Google analytics or a similar program) came from that source.

Back to those logs, you should be aware that not all log entries have referring URLs listed in the entry. This can mean several things:

  • The customer typed in the URL by hand.
  • The customer had the page bookmarked.
  • The customer was using privacy protection software that blocked the referrer.
  • The referring site is blocking referrer information.

Where Is the Referrer Stored?

Web server logs track the referrer, but you have to set up your logs to be in Combined Log Format. The following is a sample log entry in Combined Log Format, with the referrer highlighted:

Adding referrer information in your log files makes them larger and harder to parse, but that information can be very useful for determining how your website is doing and how well your marketing campaigns are performing.