: Why is "www.mysite.com" different from "mysite.com"? In any browser if I use www.mysite.com or just mysite.com the web page is correctly retrieved, but I am having trouble with Google Analytics
In any browser if I use mysite.com or just mysite.com the web page is correctly retrieved, but I am having trouble with Google Analytics and Facebook App.
Facebook:
To be able to get Likes, I create the Facebook App needed and set the site URL to mysite.com/. Using their tool developers.facebook.com/tools/debug/ when I test my page using mypage.com it works but using www.mypage.com fails with the message:
Object at URL 'http://www.mysite.com/' of type 'website' is invalid because the domain 'www.mysite.com' is not allowed for the specified application id.
Google Analytics:
To be able to get traffic statistics, I created a Property and a Profile both with the URL www.mypage.com and no statistics were gathered in a week, when I changed the configured URL to mypage.com statistics where available a few hours later.
What should I do to have statistics and likes for both mysite.com and mysite.com ??
More posts by @Cofer257
2 Comments
Sorted by latest first Latest Oldest Best
Fundamentally, www and non-www are two seperate addresses which (in general) just happen to point to the same content - largely because most web-hosts alias www and non-www
But there is no reason for this to be the case, and these two options are certainly not the only ones (think Wikipedia with en.wikipedia.org de. (etc) and where the www site is a "select your country"
In a non-pejorative sense, this is mostly down to laziness and/or ignorance of the public and many hosts.
Now back to you question, if you have both set up to be the same content, then as far as the typical user is concerned, they are the same website - but many apps (and standard SSL certificates) are not so "clever", and know that they are two separate entities.
Using both will mean incoming links are split, thus splitting any page-rank; also some search-engine crawlers treat the two as separate but duplicate, therefore penalizing you further.
There are pitfalls for using both on a site, but only benefits for sticking with a single option.
This is why it is important to pick one, and use a 301 redirection for the others (and potentially wildcard subdomains too). My preference (YMMV) is to adopt the non-www as standard.
You REALLY don't want to be using both the www subdomain AND the naked domain. This is terrible on the SEO. You can pick either, and it makes no difference which, but once you choose, you must stick with it.
The reason you get that Facebook error is because you originally configured it to use the named domain, and it treats the www subdomain as a separate entity. Same issue with Google.
After you make your decision, you'll want to redirect the one you're NOT using, to the one you picked. (You can do a 301 Permanent Redirect with an Apache rewrite rule, or if you're going from the naked domain to the www subdomain, look at wwwizer.com.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.