I have a Wordpress site hosted on Vultr, using Plesk Onyx with Apache + Nginx. I've done this same setup for other sites and never had issues, but for this new site I am seeing some odd behavior when clicking links to the site.
I noticed because Google Analytics never flags any traffic as being from a referral source. All the traffic I expect to show as Referral is showing as Direct. After looking at my Apache access logs, it seems when I click a link from some other websites, there is no referrer being logged.
This isn't the case for all links. Social platforms like Twitter, Instagram, and Facebook all get logged with the expected referrer information. Also, organic traffic and CPC/Ads traffic is also showing up as expected. It's just a handful of links from other sites that aren't logging.
Here are a few example entries from the access logs. Some contain a valid referrer (Twitter, for example) while others just contain a -
. For some of these cases, I was tailing the access log while clicking a link from another site so I know it should have a valid referrer:
X.X.X.X - - [10/Jun/2019:03:06:10 +0000] "GET / HTTP/1.0" 200 12153 "https://twitter.com/PxJVBrEB7T" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko/20100101 Firefox/67.0"
X.X.X.X - - [10/Jun/2019:03:12:37 +0000] "GET / HTTP/1.0" 200 13535 "https://twitter.com/PTVIpLWqE9" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko/20100101 Firefox/67.0"
X.X.X.X - - [10/Jun/2019:03:50:39 +0000] "GET / HTTP/1.0" 200 12308 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko/20100101 Firefox/67.0"
Is it possible Apache is misconfigured and dropping the referrer information? Or is it possible it's something to do with the referring websites?
There are multiple referring websites where links aren't showing up properly in the access log, so I suspect it's on the server side but I'm not sure what more to check.