Carter Cole LinkedInCarters Twitter PageCarter Cole on Facebook Carter Coles RSS

Tuesday, March 29, 2011

Google's little 404 page helper and dangers of soft 404s

Making sure your pages are returning proper http codes is important to your SEO efforts... (especially with redirects) but another problem that can use up your crawl quota with googlebot is an infinite space problem... these pages can be driven from a database but are often soft 404s or pages that dont exist but still return a 200 code

You should make sure your pages are returning proper 404's alot of webmasters choose to add some little joke to break the users frustration of missing a page but while digging around in google's help docs i came across a little script they wrote to include pages urls who may be the correct version of the wrong url

Just drop this code on your 404 page and be sure to change the domain name to match your own
<script type="text/javascript">
  var GOOG_FIXURL_LANG = 'en';
  var GOOG_FIXURL_SITE = '';
<script type="text/javascript"
and another cool trick i just though of would be to add something like this to the page aswell
<script type="text/javascript">
  _gaq.push(["_trackEvent", "SEO", "404 Error", document.location]);
then you can see any 4040 errors that your getting and figure out what you need to redirect to so any link love the url may have doesn't get lost


1 remarks:

Post a Comment

Link to this post if you found it usefull

Google's little 404 page helper and dangers of soft 404s