View Full Version : How to combine www.domain.no and domain.no ?
Sykepleier
10-05-2004, 10:13 AM
My stat does not combine the two web addresses under. Why?
"www.sykepleier.net"
sykepleier.net
I've tried to only send out the latter one, but Google and others are using the http://www.... version. How do I combine the two in StatCounter?
M
webado
10-05-2004, 02:12 PM
We'll see what we can do about combining them.
Ok, but then there are other situations as well where you have www1.domain.com and www2.domain.com, etc. It can get complicated. And not always accurate either.
I have seen cases where www.domain.com and domain.com do not resolve to the same exact page, and it's not always an error of configuration where the alias www was lost somehow, sometimes it's intentional.
webado
10-05-2004, 02:26 PM
we'll be doing it based on the URL list you maintain for that project - it will be up to you what sub domains you want to include or not
Then you may want to add the notion of alias?
acpeter
01-23-2005, 07:04 PM
Not an expert here, but going through some of the same issues with a few sites.
I know that when our sites get set up, they automatically have an A record created in the DNS zone. Therefore the A records look something like this:
domain.com
*.domain.com
That allows the user to call it by just the domain name or with the www.in front of the domain.
Now, we also set up 301 redirect pages in some cases. Therefore, a bunch of different pages (or just one page) can be set up to redirect to
the page you want. As I understand it, web robots will follow 301 redirects and it shouldn't hurt your search engine rankings (if you are concerned).
Now, don't ask me how to do all of this outside of a control panel. We are assosicated with a company who set up their own hosting system to host a few different domains. Therefore, logging into the H-Sphere control panel lets the user set up A records and 301 redirects.
I just thought these concepts would help.
Good luck!
webado
01-23-2005, 07:54 PM
Easy to see with the naked eye, incredibly complex to program.
You use index.htm, others use index.html, index.shtml, index.php, index.asp, .......so many different combinations.
Then there are others yet who redefine index to some other name like home, again with all those different extensions, ane even redefine extensions at the server level to be used in different ways from the obvious meaning. I may like to use extension .xyz the same way as .htm, all I have to do is set the Apache handler for it and it's done.
On a side note, does anybody know which one is the default index type if you have several such pages in a folder: index.htm, index.html, index.php, etc? Which one will the server serve when no index page is requested explicitly? I don't know and I've been trying to find out definitively with no luck so far. It may depend on a lot of other server settings.
webado
01-23-2005, 08:22 PM
I've noticed a similar issue. When looking at the stats on the "Popular Pages" section, it will list two separate listings of hits for the same page, as if they are separate pages (for example, as if cnn.com and www.cnn.com are separate pages, when clearly they are the same).
Why is that? What can be done to correct it, so that the stats in StatCounter accurately reflect all the hits on the same page together?
Thanks!
I doubt anything very definitive can be done. Yes, Statcounter could make a blanket assumption that it's one and the same domain. And they would be wrong in some cases, which may be worse.
Have you noticed how even Google and quite possibly all search engines do not make this assumption? Just looking at the page ranking of a page, one with the www and the same one without the www, you will see big differences. This is very annoying of course, but even they have not managed to solve this dilemma satisfactorily.
robinev
01-24-2005, 01:14 AM
There is a fairly elegant solution to the problem of www.domain... vs. domain..., but it can be used only if your host gives you fairly low-level access to configuration and if you can modify the .htaccess file.
If somebody cares, I'll post it, but that level of control seems to be fairly uncommon these days.
BTW, Christina: Does this page (http://bignosebird.com/apache/a2.shtml) help re defaults?
webado
01-24-2005, 01:28 AM
Well, not for my actual question. My server will gladly accept htm, html, shtm, shtml, php, php3 as possible extensions of a page. SOme from system settings, otehr through apache handlers that I specified. I was wondering hadi I had and index with each of those extensions n the same folder which one will be the default. I've not yet found the answer to this. The .htaccess file can of course be used to force things the way we want to.
The httpd.conf and srm.conf files usally outside of the user's realm, at the server level. I guess when we use an .htaccess fiel we override the defaults contained therein. None of this can really be used by any script running off a different server.
I have set up both url's in my project settings, i.e. www.jwjonline.net and jwjonline.net however they are still being treated separately within my stats. i.e 15 hits to www.jwjonline.net/England.htm and 20 hits to jwjonline.net/England.htm rather than 35 hits to one or the other (not fussed which).
Am I misunderstanding what "combining the URL's" is supposed to do, or is there an additional step I need to take like re-installing the code for instance?
webado
03-25-2005, 04:59 PM
Yes I have the same issue with the 'www.rephotodesign.com' vs rephotodesign.com vs 'www.rephotodesign.com/index.html' vs rephotodesign.com/index.html. 4 different stats for one page.
I think a more simple solution would be for us to add a hidden element in the stat code on all our tracked pages that tells statcounter what page it is, instead of being URL based.
... will have the same hidden code in it telling statcounter to track it as "www.rephotodesign.com"
I don't know how simple a solution it is for you guys at Statcounter, but I think it would work!
And how would that be a hidden element?
What happens when you add umpteen pages to your site, rename them or whatever? How do you constantly maintain that?
webado
03-25-2005, 05:21 PM
Sorry, there's nothing "hidden" on a web page. The hidden element you are referring to means that it is just not shown on the page when it's rendered, but it is an element in a form, used for passing info elsewhere. It is not hidden at all when you look at the source code. That stuff is easy to fake by anybody, and I mean anybody.
robinev
03-25-2005, 07:59 PM
Or have statcounters javascript retrieve that name element when the page loads instead of retrieving the URL used. However it works, it's as simple as that.
It could actually be even simpler. Just add a variable like, say, "var sc_ReplaceName". The SC code could use any value assigned to that variable instead of the actual page name.
It's fairly simple, but I suspect it would cause as many headaches as it would solve since there are bound to be users who assign a value on one page and then copy the code to a new page without changing the value and then wonder why hits to different pages are being combined.
webado
03-25-2005, 08:26 PM
The whole idea is to have a piece of code that does not need fiddling with from one page to another. Otherwise you might as well write your own counting scripts.
As it is we have seen how that or the referrer field can be faked by all the stat spammers.
And as Robinev said, it is a given that a lot of people will forget about that and simply copy the code from one page to another and then jump up and down when their stats show wrong information.
neoncarrot
04-18-2005, 11:10 PM
This is a weeny bit off topic, but connected. For those who haven't properly tied down the form of domain used to access their site (domain.com or www.domain.com), and who depend on Google for traffic, the issue is bigger than accurate tracking. You could encounter problems and attract a "duplicate content" penalty from Google and slip (or disappear!) from the listings altogether.
Google (and other SEs) follow a link to a page at domain.com/info.html, then another link to a page at an apparently different location, www.domain.com/info.html. The content is identical (in most cases) but the address is different, so the SE assumes you are duplicating content for some reason and punishes you.
Its very much in your interests to use only one form of the URL (say www.domain.com) - doesnt matter which really - and redirect any requests for the other form to the main address using a mod rewrite entry in .htaccess. In addition to avoiding any problems with SEs (and to some extent the Google'pagejacking' issue causing much angst on www.webmasterworld.com forums), it will ensure you have no dramas with statcounter.
Assuming your host supports mod_rewrite and the server is apache, it might look like:
RewriteCond %{HTTP_HOST} ^yourdomain\.com
RewriteRule ^(.*)$ http://www.yourdomain.com$1 [R=permanent,L]
with 'yourdomain' substituted for the actual domain name. In this case all requests for http://domain.com/a_directory/page.html will be rewritten to http://www.domain.com/a_directory/page.html .
webado
04-18-2005, 11:19 PM
I'd think it's faulty hosting setup if the www is not just a straight alias of public_html, at least on a Unix server.
This should not be required and it can cause more headaches than good if attempted.
robinev
04-19-2005, 02:29 AM
I'd think it's faulty hosting setup if the www is not just a straight alias of public_html, at least on a Unix server.
I think it's a different issue. Most Apache servers are, indeed, set up to treat www.domain as an alias to domain. but that won't prevent the kind of double-indexing that neoncarrot is talking about. I doubt there would ever be a penalty for this, since it's so common, but there is a hit for things like PageRank (if that matters to the site), as well as the kind of hassle with StatCounter that is the subject of this thread.
Using mod_rewrite in the way he recommends is about the only way to assure that Google, and other SEs consider only one version of the name.
The standard aliasing doesn't send any kind of message indicating which of the two possible references is considered correct by the web site's owner. mod_rewrite will send the response that tells the SE to drop one or the other of the references and replace it with the preferred version.
If it's available, and if one is very careful when introducing it, then I too would recommend (as I have before) using mod_rewrite for just this purpose.
Why not leave it to the domain owner to decide what to combine?
If you provide me with a page where I can list similar pages for StatCounter to combine, I'll happily do it manually....
I also support this idea, you can add an option for the common default names (index.html, index.htm etc.
In addition you can add an option (maybe on by default) which will combine the statistics with and without www. - since it would be too much to alias together 'www' for all pages of a large site...
OzFree
07-29-2005, 09:34 AM
Why not leave it to the domain owner to decide what to combine?
If you provide me with a page where I can list similar pages for StatCounter to combine, I'll happily do it manually....
I also support this idea, you can add an option for the common default names (index.html, index.htm etc.
In addition you can add an option (maybe on by default) which will combine the statistics with and without www. - since it would be too much to alias together 'www' for all pages of a large site...
For what it's worth, my personal website is on my ISPs servers, and they have many different access points. So for example, in my case
http://www.servername.com.au/~username/filename.html
http://www.servername.net.au/~username/filename.html
http://home.servername.com.au/~username/filename.html
http://home.servername.net.au/~username/filename.html
http://servername.com.au/~username/filename.html
http://servername.net.au/~username/filename.html
are ALL the same page! Six different ways just to access the index.html page, and then for every page thereafter there's another 6 ways to access it!
So for my case, it would be great if there were a page on StatCounter where I could list all the prefixes and say "These are ALL the same prefix" and have StatCounter only pay real attention to the "filename.html" part.
This wouldn't work for everyone -- mine's only a personal webpage and only has HTML documents, and other people would have different filename extensions -- but it would be WONDERFUL for me as my personal webpage now has about 50 main pages plus some extras, and all fall into the above template.
Just my two cents' worth ...
OzFree.
jksobonya
01-27-2006, 02:57 PM
This is a GREAT idea, but seems to have gone unnoticed in this post.
--
A simple page with multiple HIT pages listed with checkboxes and the ability to unify (by clicking box 1, 2, 4, 7, 9 and 10) and telling them them are all the same page. This should be easily done in a SQL INNER JOIN command.
--
Any PHP peeps wanna post the MySQL code to make this happen so the developers have a head start in the game. I'm and ASP/VBScript guy myself.
Hope this helps to get this resolved, I would really like to see this solution as well.
I agree with this as well. I hope we can find a happy medium here. ;-)
~Jessica
pierrebe
04-22-2006, 01:37 PM
I see the post is old. Have you solved it? Fixed?
To old and to anoying, I posted a new thread and hope this time they do something about it...
> http://forum.statcounter.com/vb/showthread.php?t=21534
webado
04-22-2006, 02:12 PM
Annoying indeed. You should have checked the stickie for that first.
http://forum.statcounter.com/vb/showthread.php?t=14405 post 18.
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.