Analytics
6.1K members online now
6.1K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Redundant Host Names

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I added the following code to my .htaccess file on our site but still get a "Redundant Host Names" message.  Is the following code incorrect or did I do something else wrong?  Appreciate your help.

 

RewriteEngine On # This line may already exist # Rewrite all requests to the 'www' version
RewriteCond %{HTTPS_HOST} ^oldeworldelace\.com$ [NC]
RewriteRule ^.*$ https://www.oldeworldelace.com%{REQUEST_URI} [R=301,L]

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Al N
June 2016

Re: Redundant Host Names

Top Contributor
# 6
Top Contributor
Hi,

The problem is fixed now. In Google Analytics where the warning is displayed there is a link "check again", please click that and GA will check if the problem is fixed. If it finds everything in order the warning won't be displayed again. Let me know if you have more questions.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

View solution in original post

Re: Redundant Host Names

Top Contributor
# 2
Top Contributor

Hi Al,

 

It seems that your redirect code is not working, I can visit oldeworldelace.com without getting redirected to www.oldeworldelace.com. Please try the slightly modified code below:

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

Please let me know once you've added it to the .htaccess file and I'll check it again for you. Thanks.


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Redundant Host Names

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Thanks a lot for the info. Your suggested code has been added. I did change your code to https instead of http. I hope that was right. It seems to work now. I appreciate your offer to check again. Since I am self taught I need my hand held occasionally.

Re: Redundant Host Names

Top Contributor
# 4
Top Contributor

Hi Al,

 

I can still access http://oldeworldelace.com/ without getting redirected to http://www.oldeworldelace.com/. Another problem is that the site is accessible through both http and https, so actually you have four versions. I would suggest setting your preferred domain in Google Search Console:

 

https://support.google.com/webmasters/answer/44231?hl=en

 

I checked your site again in order to gather more information about your server setup. The .htaccess file has no effect on your server because it is using Microsoft IIS and htaccess is an Apache webserver configuration file. Your site is hosted at Godaddy, fortunately they provide a service for setting up redirections manually. Please check the Godaddy help article below:

https://uk.godaddy.com/help/manually-forwarding-or-masking-your-domain-name-422

 

Hope this helps, let me know if you have more questions.


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Redundant Host Names

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
I guess the problem is at least partially fixed. I called Godaddy and they gave me a code that I put in my .htaccess file and no matter how I type in the URL with or without the www or with the http it now ends up at https://www.oldeworldelace.com which I have set up on my Google account as being the preferred URL. I still have a problem and would appreciate your advice. I get the following message when I try to access my google account:
Property Https://www.oldeworldelace.com is receiving data from redundant hostnames. Some of the redundant hostnames are:
oldeworldelace.com
www.oldeworldelace.com
Redundant hostnames are counted as separate rows in reports, so hits that are going to the same page on your site from different hostnames will be split into multiple rows. With data split across multiple rows, traffic to specific pages will appear lower than it actually is.

To avoid this problem, consider setting up a 301 redirect from one of your redundant hostnames to the other, or create a search-and-replace filter that strips "www." from hostnames.
Marked as Best Answer.
Solution
Accepted by topic author Al N
June 2016

Re: Redundant Host Names

Top Contributor
# 6
Top Contributor
Hi,

The problem is fixed now. In Google Analytics where the warning is displayed there is a link "check again", please click that and GA will check if the problem is fixed. If it finds everything in order the warning won't be displayed again. Let me know if you have more questions.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Redundant Host Names

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
Many thanks Arnold. The problem is solved. Your following up on the problem was much appreciated.

Re: Redundant Host Names

Top Contributor
# 8
Top Contributor
You are more than welcome, I'm glad I could help.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Redundant Host Names

Follower ✭ ☆ ☆
# 9
Follower ✭ ☆ ☆
RewriteEngine On
RewriteCond %{HTTP_HOST} ^oldeworldelace.com [NC]
RewriteRule ^(.*)$ https://www.oldeworldelace.com/$1 [L,R=301]