redundat hostnames in Google analytics

one notification is coming from past two days that I have a redundant hostname. When I checked the solution for it. Some people are saying to modify htaccess but before modifying it, I should confirm from the admins, should I modify htaccess file to avoid redundant host name. Is it right?

redundant hostnames are
www.solutiongeek.in
solutiongeek.in

Yes, you should pick whether you want your website to be on solutiongeek.in or on www.solutiongeek.in, and then set up a redirect to make sure all requests are redirected to one of the two URLs. .htaccess rules are commonly used to force traffic to www or non-www URLs, but there are also plenty of website scripts which can do this for you.

so if I redirect to my non-www site, is it going to affect my SEO of www site?
or affect both the URLs

or where should I put the script? in main htdocs or the copied htdoc placed inside the directory

@download said:
so if I redirect to my non-www site, is it going to affect my SEO of www site?
or affect both the URLs

or where should I put the script? in main htdocs or the copied htdoc placed inside the directory

mean to say in htaccess or htaccess copied inside the htdocs, where should I put the script

@download said:
so if I redirect to my non-www site, is it going to affect my SEO of www site?
or affect both the URLs

Yes, this should improve your search engine ranking. By setting up the redirect, you avoid having multiple URLs with the same content, and funnel all rankings to a single domain.

@download said:
or where should I put the script? in main htdocs or the copied htdoc placed inside the directory

What copied htdoc do you mean? And what script are you referring to?

The .htaccess rules should be placed in the htdocs folder of the domain you want to set these rules on.

RewriteEngine On # This line may already exist # Rewrite all requests to the ‘www’ version
RewriteCond %{HTTP_HOST} ^mydomain\.com$ [NC]
RewriteRule ^.*$ http://www.mydomain.com%{REQUEST_URI} [R=301,L]
i want to uplaod this script

Do a search in google with your domain, and check is google index www or not. If it index www then go with www, if no don’t use this prefix.

@Geek_Tips_Hub said:
Do a search in google with your domain, and check is google index www or not. If it index www then go with www, if no don’t use this prefix.

my real domain is registered with non-www and most of the traffic comes through non www-urlso I am thinking to forward url with non-www address

@download said:

RewriteEngine On # This line may already exist # Rewrite all requests to the ‘www’ version
RewriteCond %{HTTP_HOST} ^mydomain\.com$ [NC]
RewriteRule ^.*$ http://www.mydomain.com%{REQUEST_URI} [R=301,L]
i want to uplaod this script

The .htaccess rules should be placed in the htdocs folder of the domain you want to set these rules on.