AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
2.3K members online now
Discuss regaining access to Analytics accounts, restoring accounts, changing user access levels, and navigating the homepage
 
Guide Me
star_border
Reply

Should I have GA accounts for www and non-www?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi everyone! I currently have two properties under Webmaster Tools: my domain with www and my domain without www (ex: www.website.com and website.com), as Google recommended submitting both.

 

I've set up a Google Analytics account only for the www domain. Should I also make another Analytics account for the non-www domain?

 

Thanks.

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by James_Clemens (Top Contributor)
September

Re: Should I have GA accounts for www and non-www?

Top Contributor
# 4
Top Contributor
Hi :-)
For help with SEO related questions, best place to ask would be the webmaster central help forum
Having said that www and non-www for seo and also tracking purposes though they both serve the same site
content, they are not seen as the same.
General best practice for seo would be to pick which one you want as the preferred domain and then redirect the non
preferred.to it
Google analytics Property and Views should then be setup to reflect the preferred domain name.

More reading can be found here re www and non-www
https://moz.com/learn/seo/canonicalization
https://www.mattcutts.com/blog/seo-advice-url-canonicalization/
Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

View solution in original post

Re: Should I have GA accounts for www and non-www?

Top Contributor
# 2
Top Contributor
Hi Jeromy :-)
Do you have a 301 redirect setup to redirect the non-preferred domain to the preferred domain?
Is www the preferred configured as the preferred domain in webmaster tools?


Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Re: Should I have GA accounts for www and non-www?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi Bronwyn,

Thanks for your reply. Sorry, I'm new at this. I wasn't sure if there was an advantage with choosing www or non-www, so I haven't set the preferred domain. I'm also a little nervous that if I redirect one of the two, it will negatively impact the website. What are your thoughts?

Marked as Best Answer.
Solution
Accepted by James_Clemens (Top Contributor)
September

Re: Should I have GA accounts for www and non-www?

Top Contributor
# 4
Top Contributor
Hi :-)
For help with SEO related questions, best place to ask would be the webmaster central help forum
Having said that www and non-www for seo and also tracking purposes though they both serve the same site
content, they are not seen as the same.
General best practice for seo would be to pick which one you want as the preferred domain and then redirect the non
preferred.to it
Google analytics Property and Views should then be setup to reflect the preferred domain name.

More reading can be found here re www and non-www
https://moz.com/learn/seo/canonicalization
https://www.mattcutts.com/blog/seo-advice-url-canonicalization/
Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Re: Should I have GA accounts for www and non-www?

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Hey Jeromy

You only need the one GA account - but yes - in Search Console - set the preferred domain so that Google is aware of that. (click the GEAR ICON) and select SEARCH CONSOLE PREFERENCES - then choose which domain version is preferred. Essentially both versions are actually separate domains in their own right so make sure a 301 is in place too to ensure that all your data that is shown in Search Console is as accurate as possible.

Another thing to make sure of is that when creating 'stuff' online which then links back to your site - you should wherever possible try to make sure that the same (preferred domain) is used. E.g. if you choose www.yourdomain.com as preferred then make sure if say you blog or create content that links back to your site - you also use the www's there too.

Hope that helps.

Re: Should I have GA accounts for www and non-www?

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭
Hi Mark,

Thanks for your reply. I set my preferred domain to www. However, I'm not quite sure how to go about the 301 redirect from non-www to www. I currently have my domain pointing to Wix. But according to them, there is no way to set up 301 unless you are merging two websites. Someone else had this issue here: http://www.wix.com/support/html5/ugc/6f08e9ae-7cc0-4e4e-becc-79415427e24a/6142c843-a5e8-4a98-8ecd-47... , but Wix pretty much says that there is no need to do this and that the non-www is automatically redirected to the www.

Does this sound right to you?

Re: Should I have GA accounts for www and non-www?

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
I actually have the same problem, just with 4 versions created in webmaster tools: www and non www and https with ww and without... I cant seem t find anything in google analytics what I should be setting up as an account.

Should I have GA accounts for www and non-www?

Visitor ✭ ✭ ✭
# 8
Visitor ✭ ✭ ✭

Dont add multiple urls to track, it only creates confusion and lots of un managed data which wont help you 

redirect all urls to your preferred one using 301 redirect.
Took me a while to figure this out as a newbie and no clear guidance out there with people still using old analytics.js tracker and googling urging people to use the latest  gtag method (in beta).

 

To do a redirect simply write these lines in your .htacess file in the root directory(make sure you can see hidden files. In many cases they dont exist like it didnt for my new hostgator hosting so I created one).

So find/create the .htaccess and add these lines to it

 

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.empire-informatics\.com$
RewriteRule ^/?$ "http\:\/\/empire-informatics\.com\/" [R=301,L]

 

This way if anyone ever tries to open the www. version, they get sent to non www. version. 

So with this you have fiixed the traffic, limited to non www. version.

 

Now just add the analytics.js/gtag.js (based on preference. gtag is in beta but has more features and still more being developed to help track better). Add the tracking script in the head of the index.php/html and you are done.

No need to add tracking for www or http. One tracking code and one property will do it.

Should I have GA accounts for www and non-www?

Top Contributor
# 9
Top Contributor

Unfortunately not everyone has the ability to edit their htaccess file to do 301 redirects.
In which case simply adding the preferred domain information in search console will have to suffice.. 

along with adding canonical tags to their pages if possible.

 

regarding the new gtag.js.. its in beta.. so no rush to implement it.

A lot of ppl wont have a need for it unless they are also looking to unify data from other google products too

Some handy reading in the following article
https://www.e-nor.com/blog/google-analytics/google-analytics-new-global-site-tag-offers-unified-goog...

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here