Redundant hostnames in GA

Dakis

Well-known member
Licensed customer
I just got a funny message in my google analytics, telling me this:

REDUNDANT HOSTNAMES

Property http://www.travelstories.gr is receiving data from redundant hostnames. Consider setting up a 301 redirect on your website, or make a search and replace filter that strips "www." from hostnames. Examples of redundant hostnames: travelstories.gr, www.travelstories.gr.

What is this about? And why did it show up just now? Did google make any changes? cause I haven't changed anything on my site for a while.

This is my .htaccess:

Code:
# xenforo start


RewriteEngine On
RewriteCond % ^travelstories.gr [NC]
RewriteRule ^(.*)$ http://www.travelstories.gr/$1 [L,R=301]
RewriteRule [^/]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
RewriteRule [^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]
Redirect 301 /index_forums.php http://www.travelstories.gr/community
Redirect 301 /mag http://www.travelstories.gr/community
Redirect 301 /community/portal http://www.travelstories.gr/community

# xenforo end

RedirectMatch permanent ^/$ http://www.travelstories.gr/community/
 
Thanks for your responses fellows - any idea how I can correct my rewrite rule to redirect the non-www to the www version of my site?
 
I have exactly the same problem. I'd be curious as to how to fix it with cPanel. It's not as easy as one might hope.
 
Yes I'm getting error too. It's pretty recent and I haven't made any changes to my server.
 
I haven't figured out what to do , no.

fixed it.

Put this at the top of your .htaccess file:

Code:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
 
it makes it so every time someone pulls up your site using www.thisisjustatest.com/testpage or whatever, it automatically redirects to http://thisisjustatest.com/testpage

It removes the www leaving just one hostname, therefore google wont complain that you have two sites essentially as its perceived by them with and without the www.

In doing those changes, do I need to remove these lines out of my .htaccess?

RewriteCond % ^travelstories.gr [NC]
RewriteRule ^(.*)$ http://www.travelstories.gr/$1 [L,R=301]

Otherwise it might end up doing a loop?
 
The problem is my htaccess already has a rule for redirecting , which was working at first but not anymore apparently - can anyone think of why this happens? Note this is the htaccess located in the root directory - in the xenforo directory I've got another one.
 
Back
Top Bottom