Why Do I See My Own Domain in the Referrers List of Google Analytics?


Companies often come to us to correct their Google Analytics configurations. The problems we encounter vary from the very simple to super complex, but by far the most common problem I see is the “self-referral” configuration problem.

What this means, is when you look under Traffic Sources->Sources->Referrals you see your own website’s domain in the list of referring sites. (Note: LunaMetrics doesn’t actually have this problem, I totally faked this screenshot!)

My domain in referrers list

Often this is your top referrer, which is really going to mess with correct attribution. Unfortunately, there is no one reason this happens, but almost all are easily fixable.

First, one of the reasons this could be happening is that cookies cannot be shared between domains for security reasons. So under typical conditions, test.www.lunametrics.com cannot read a cookie from www.lunametrics.com. So the first thing you should look at is your domain.

Do both of these work to get to your content? (And they don’t redirect):

  • www.yourdomain.com
  • ww2.yourdomain.com

If so… first give yourself a good hard smack from our SEO team. Second, what could be happening is someone enters your site on http://www.yourdomain.com and then clicks a link that explicitly specifies a different sub-domain like http://ww2.yourdomain.com/aboutus.html . In that event, (assuming you’re not using the setDomain directive) Google will count www.yourdomain.com as a referrer to aboutus.html.

The second most common cause of this problem is one of your pages not being tagged with Google Analytics code. When someone lands on your site for the first time, it starts a “Session”. Once this session is started, Google counts each page click as part of it’s pages per visit metric.

Each time you go to a new page, Google will look at the HTTP header to see where you came from previously. If someone lands on a page that has no tracking code, that chain is broken. Once you go to another page that does have tracking code, Google will say “hey he just came from a page that wasn’t part of this session, guess it must be a referrer”. So make sure all of your pages have GA tracking code on them, and that it’s working correctly.

The final reason this happens is somewhat up for debate. I’ve read and been told that this can happen when your session expires. For example, I go to www.lunametrics.com and leave my browser open for an hour so my session expires (after 30 min). I then click a link, and the theory is that now that I’ve started a new session, www.lunametrics.com is the referrer for that link click. However, in practice when I’ve experimented with this, the referrer shows up as (Direct) when I do that. Maybe someone else can add a comment about how this could occur.

Hope those tips help you clean up your Analytics a little! If you love Analytics and are thinking about attending the GAUGE 2012 conference in Boston this October? We’ve got ten 25% off codes for Super-Early Registration – if you are interested, DM us on Twitter.

Phil is a former LunaMetrician and contributor to our blog.

  • aluminium du maroc

    Wow, awesome article! How long have you been blogging for? I’ve always wondered what caused this problem.

    PS- The whole look of your web site is wonderful, as neatly as the content!

  • Hi Phil – good stuff here, thanks. Do you know if you can use _addIgnoredRef() (as referenced here: https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiSearchEngines#_gat.GA_Tracker_._addIgnoredRef) to ignore your own domain as a referral?

    • Phil Anderson

      Hi Eric, I assume you mean if the solutions in the post don’t work? The only problem I see with addIgnoredRef is that it will turn it into (Direct) traffic, which isn’t much more valuable then seeing your own domain. Ideally you really want to see the original attribution source.

  • Shailendra Dubey

    Hi Phil,

    We have encountered with a new problem.

    We have 3-4 mobile websites & we have implemented Google Analytics mobile tracking code (https://developers.google.com/analytics/devguides/collection/other/mobileWebsites).

    Now in referral list we are seeing our own mobile domain i.e. m.mobiledomain.com as referral.

    How to deal with this situation.

    I have asked this question from many communities but did not get sufficient answer.

    • Phil Anderson

      Are you actually using that type of mobile website tracking (mainly useful for old school feature phones)? If so, you are pretty limited in terms of what you can do because of how that behaves since cookies cannot be set. You could use the addIgnoredRef that Eric points out above. If you are targeting smart phones (iPhone/Android/etc..) I would switch out to using the regular JavaScript tracking.

  • I think that is among the such a lot vital info for me. And i am happy reading your article. But should observation on some normal issues, The website taste is wonderful, the articles is in reality excellent : D. Good activity, cheers

  • Hi Phil,

    With regards to your final point (session time-out), when the document.referrer matches document.domain, GA will return a 0 as the value in the utmr parameter of the utm.gif request and utmz cookie will not be updated. In other words, just as you said – the visit is seen as direct traffic and all of the rules of Direct Traffic as they relate to the utmz cookie apply. I’m curious to know where there is debate about this. As you mentioned, just testing this out demonstrates how this works.

    As a result of the above, when a session times out and then someone clicks into a subdomain, even if _setDomainName is correctly implemented, there will still be a self referral since there won’t be a match between document.domain and document.referrer. Jeremy Aube wrote about this on the ROI Revolution Blog (http://www.roirevolution.com/blog/2011/01/google_analytics_subdomain_tracking.php) and suggests using _addIgnoredRef for this reason. This is indeed a good idea for subdomain tracking.

    I agree with what you said, that just shoving in _addIgnoredRef to bandage the self-referrals is a bad idea. Much better to clean up one’s config and not lose attribution due to the cookie-monster blues.



    p.s. Props to Caleb Whitmore for teaching me about the above.

  • Phil Anderson

    Hi Yehoshua, maybe there isn’t a debate, just people stuck on an urban legend or old data :).

  • Sandra G

    Hi all, joining a little late, but still got some info that might be of your use. To carry on data info from your domain to your subdomain and viceversa, you may have to use the cross-domain tracking functions using Allow linker, _link, and _linkByPost, thus allowing to pass on the cookies data from one site to another, keeping your original traffic sources.
    Please let me know how you found this.


  • Steve Baxter

    Wouldn’t setting a filter to ignore traffic from your own domain solve this problem in a very simple way?

    • Dorcas Alexander

      Hi Steve, You definitely do not want to use a filter to ignore traffic from your own domain. Such a filter would not simply remove self-referrals from your traffic reports. It would also remove the pageview data associated with those self-referrals. Using extra code instead, as noted in the first comments above, is the best “last resort” option. This code is the only way to ignore the referral info without ignoring the pageview data.

    • Robbin Steif

      Yes, but it will also mean that you lose all that traffic, and much of it is not “internal.”

  • Lisa

    Thank you for the helpful post!
    I have a question about the cookies that can’t be shared because of the security reason.(What you have mentioned in the beginning of this post.)
    Are there any ways to make this work by editing the ga code?
    I would appreciate if you could let me know.

  • Hi there, I found your blog by means of Google even as searching for a comparable topic, your website got here up, it seems great. I have bookmarked to my favourites|added to my bookmarks.

  • Hi
    Thanks, useful.
    What if going to mywebsite.com instead of http://www.mywebsite.com works without redirecting to the www. could that also be a cause?

  • if my main domain is http://www.domain.com what is the domain do I need to use

    _setDomainName : http://www.domain.com OR
    _setDomainName : domain.com

  • Fence Mounts – Help Aesthetics Of the Room

Contact Us.

Follow Us




We'll get back to you
in ONE business day.
Our Locations
THE FOUNDRY [map] LunaMetrics

24 S. 18th Street
Suite 100

Pittsburgh, PA 15203


4115 N. Ravenswood
Suite 101
Chicago, IL 60613


2100 Manchester Rd.
Building C, Suite 1750
Wheaton, IL 60187