search
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 = 'http://www.cartercole.com';
</script>
<script type="text/javascript"
  src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js">
</script>
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]);
</script>
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

PS:

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