![]() |
Recording 404's - Is it possible? |
Post Reply ![]() |
Author | |
St_Pierce ![]() Groupie ![]() Joined: 14-December-2008 Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() Posted: 01-May-2010 at 8:43am |
Hello Everyone,
Does anyone have a nifty piece of code for the 404.asp page that would record the page request that is generating the 404?
Month after month when viewing my Webalizer statistics, the top url is the 404.asp page. I think it's being caused by search engine, maybe a relative link problem or something because I sure can't seem to generate one (except If I do it on purpose).
I'd like to find out whats going on there... don't need search engines hitting 404's.
Thanks!
|
|
![]() |
|
Greg Dinger ![]() Certified ProductCart Developers ![]() ![]() Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
![]() ![]() ![]() ![]() ![]() |
I'm not sure that what you are asking for can be done. Maybe Sean or another developer has an idea but fundamentally, what is being revealed in the stats is precisely what is happening.
The reason that 404.asp is showing is because that is the page that is used by the SEO mod to determine which page your navigation is pointing to. That page then performs a redirect to viewprd.asp, while causing the URL to make it appear you are on a product, category or content page.
|
|
![]() |
|
benpate ![]() Groupie ![]() ![]() Joined: 15-February-2007 Location: United States Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
yes you could easily capture the page and then record it to a database table or write it to a text file.
You would need to do something like Request.ServerVariables("PATH_INFO") and then choose how you want to record it using one of the previously mentioned methods. |
|
ProductCart SEO - Resellers and Affiliates welcome
|
|
![]() |
|
Greg Dinger ![]() Certified ProductCart Developers ![]() ![]() Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
![]() ![]() ![]() ![]() ![]() |
Hi Ben, I agree with this in principal, but probably not in practice. One could certainly capture the path and write it to a database table. Then you build a set of reports to analyze the results. Client may or may not have the budget for that. But sure, it could be done.
However, here's the rub. If that were the route one took, you are looking at additional load on the database (maybe not so much of a problem), and potentially massive growth - which could become an issue.
If this were the route that one was to take, then you better be prepared to roll those entries into summary records at some point because in a busy store that's going to grow your database at a phenomenal pace - and potentially increasing hosting costs. If you consider the load in terms of visitors that a site may receive, including humans, search engine spiders/bots, and stuff like ScanAlert, this becomes a lot of entries.
So at that point I'd almost want to write those records in the format of a typical web server log file, and work out a way to cause some off the shelf stats application to read/summarize/report on the data - and of course to clear the logs with regularity.
Thoughts on that?
|
|
![]() |
|
mattprice ![]() Senior Member ![]() Joined: 03-June-2007 Location: United Kingdom Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
You can create a free account at Google Webmaster Tools and among other things it does a pretty good job at finding 404's from a crawl perspective. It gives you the 404 url and tells you which page links to the offending 404.
Matt
|
|
![]() |
|
St_Pierce ![]() Groupie ![]() Joined: 14-December-2008 Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
Thanks All for the replies...
Greg - are you saying that the 404.asp page is called upon every request? After viewing the comments in the code and added code to record to a .txt file, I see entries are recorded in the text file even when I click valid pages. So maybe I don't have a problem at all, that the reason 404.asp is the top url is beacuse of what you mentioned in your previous post.
Here is what appears in the .txt file when I record Request.ServerVariables("PATH_INFO")
5/2/2010 3:06:33 PM /store/pc/404.asp 71.224.147.177
Matt - I have a google webmaster account... would you see that info under Diagnostics>> Crawl errors? I've checked that as well and nothing is showing up as an error.
Please let me know if I'm understanding everything correctly... Thanks Guys!
|
|
![]() |
|
Greg Dinger ![]() Certified ProductCart Developers ![]() ![]() Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
![]() ![]() ![]() ![]() ![]() |
Yes, that's how the SEO-friendly pages feature works - by using a 404 handler. Every valid page in the site will result in a 404 hit.
Matt's input is excellent. I don't look at GWT very often.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |