Google Analytics “Redundant Hostnames”

As of October 14th, 2014, Google analytics now warns users of having Redundant Hostnames causing hits to their analytics.
Many users are now seeing the error: ‘You have 1 unresolved issue: Redundant Hostnames.’

Redundant Hostnames - Property example.com is receiving data from redundant hostnames.

This means that there is more than one domain that can be used to access a particular page. For example, the domain example.com has redundant hostnames because it is accessible from www.example.com and example.com . This issue can also occur if your site is accessible by its ip address. For optimal user experience and seo practices, webmasters need to 301 redirect traffic to one consolidated domain.

In addition to providing 301 redirects, there are some best practices you can put into place to ensure your content is not duplicated across hosts.
The first is to add the following line to your robots.txt file:
Host: example.com
Replace example.com with your preferred host, be it www.yourdomain.com or just yourdomain.com

Google Webmaster Tools also allows you to set a prefered hostname under “site settings”. This will ensure that your host is consistent across all traffic from google. You must have the www and non-www versions of your site verified on WMT in order to set this feature.

19 thoughts on “Google Analytics “Redundant Hostnames””

  1. I wonder how bad Google will be shamming us for not using 301’s? How do I do a 301 redirect? Is it done through my hosting service provider? Or, Do i create some sort of JavaScript redirect?

    1. 301 Redirects are typically done at the hosting server level or at the CDN (Content Delivery Network) level– if your website uses a CDN. The most common server-level configuration file is the .htaccess file. It can be placed in any directory to modify requests that take place at that directory level or lower. Searching 301 redirect htaccess will point most in the right direction.

  2. Nice article! Thanks for the info, I’m getting that error in my GA panel too. Trying to see how I can resolve that and using a CDN too, of coarse. BTW, I love that you’re using the 2014 Theme. It’s a solid theme for blogs and info sites though I see very few use it and I never know why. Everyone always throw up some crappy free theme that’s poorly coded and has buggy features. Cheers to your knowledge and appreciation for simplicity!

  3. Hi thanks for the article. In theory this is how it is supposed to work, however I have set the preferred hostname in Webmaster tools, and have a server side 301 redirect, however GA still reports redundant hostnames, I also see my site as a self referral under referrals in GA.

  4. whoah this weblog is wonderful i realy like studying your articles.
    Staay up the good work! You already know, a lot of people are searching round for this information, you
    could help them greatly.

  5. I am hosted by Yahoo Small Business. Some time in 2012 they changed “something” and suddenly my searches were split into http://www.panicend.com and panicend.com resulting in a significant drop from page 2ish on google when searching the term “panic attacks” to page 8 or p. Yahoo claims not to allow 301 redirects. Is there anything that can be done to combine the two web addresses or should I just get a different hosting service? I have a known email through the Yahoo account and that prevents me from switching.

    Thanks for any advice

    1. You should 301 redirect one site to the other – taking users from your non-www site to your www site or the other way around, it doesn’t really matter which one you choose. Also, setup a “Preferred domain” in Google Webmaster Tools.

      1. I have to go for changing non www to http://www.abc.com in Google webmaster tool, but didn’t change there. How to resolve my problem with webmaster tools. After choosing of preffered domain in webmaster display a massage first verify your domain to non www like http://abc.com

  6. Thanks Luke for your response. However, as I stated above, my current web hosting service (Yahoo Small Business) does not allow ht access files and therefore 301 redirects cannot be used. I was wondering if I should change hosting service providers or if there is another way to combine the two. Thanks again.
    jeff

    1. This sounds like a variation of Google Analytics referral spam. These sites might be faking traffic to your analytics account so you visit their domain.

  7. Thank you i am trying your tactics at one of my website. I am happy that your code solve this. Very very thank you

  8. I am also having the same problem. I found a quick way to fix it. Add this to your htaccess file:

    ———————————————————
    Redirect Site to WWW URL: Use this setting if you want to keep your site always running www url.

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^example.com [NC]
    RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]
    ———————————————————-
    Redirect Site to Non WWW URL: If you want to keep your site to run always without www url.

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www.example.com [NC]
    RewriteRule ^(.*)$ http://example.com/$1 [L,R=301,NC]

Leave a Reply

Your email address will not be published. Required fields are marked *