5

Given a log line from Apache such as the following:

xx.xx.xx.xx - - [04/Jan/2016:10:42:27 -0800] "GET / HTTP/1.1" 200 6861 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36"

What is the cause of the "-" in the referrer location? I'm guessing that means the information wasn't available, but I'm trying to understand what causes this. Does it mean that this visitor typed the URL directly in the location field of their browser? Does it indicate a bot rather than a human? Or maybe the question should be what are the different actions that could produce the "-"?

  • 1
    Referrer is optional and cannot be guaranteed to be provided or accurate – John Conde Jan 4 '16 at 19:11
  • 1
    Often, these referrers are from bots - mostly from bots who do not wish to identify themselves such as bad bots. This is not always the case, but you can bet your last dollar most of the time and you would be right. – closetnoc Jan 4 '16 at 19:13
9

That means that the visitor did not send a referrer for the request. That can happen if:

  • The user was a "direct" visitor and typed the URL into the browser bar or used a bookmark.
  • The user followed a link from outside the browser (for example from an email or mobile app.)
  • The user came to your non-secure http site from a secure https site and the browser hid the referrer for security reasons.
  • The user modified their browser not to send a referrer (such as using a browser extension to hide the information.)
  • The user is using a proxy server that removes referrer headers.
  • The clicked link has an HTML5 rel=noreferrer attribute.
  • A site uses JavaScript to link to your site. Many browsers don't send a referrer when JavaScript uses window.open or location.href to open or set a URL.
  • A page redirects to yours with a meta refresh. Browsers either reset or remove the original referrer with this type of redirect.
  • The request was made by a robot that is not programmed to send referrer information. (Even legitimate robots such as Googlebot often do not send a referrer.)

Google Analytics counts all non-referrer visitors as "direct", as long as they execute the GA JavaScript and don't have an obvious robot user agent. A significant number these "direct" visitors don't send a referrer for some reason other than typing in the URL. We know this because Groupon accidentally dropped out of search engines for a few hours. During this time period they also saw most of their so called "direct" visitors disappear. They could only conclude that most "direct" visitors in Google Analytics were actually search engine referrals.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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