I’ve been playing around with WP-Googlestats for some blogs, and I noticed something I really didn’t think about until now. Googlebot, and other spiders, all spider the trackback URL’s that are in the meta data for posts. But since it spiders that and it’s not really sending a trackback, it get’s redirected to the post again.
This is were, in my opinion, WordPress goes wrong, as that redirect is a 302 redirect. On line 65 of
wp-trackback.php, it says the following:
So it uses the function
wp_redirect to redirect you back to the original post. This function lives in
wp-includes/pluggable.php, and by default, sends a 302 redirect. You can make it send a 301 redirect by simply changing the code to:
This way, this Googlebot crawl wasn’t in vain, as it just spiders the original URL again. You can wonder whether that’s to useful, so another solution might be to block Googlebot and other spiders from crawling it all together, by adding this to your
That way, Google won’t spider the URL at all. I’d rather have it spider the post again, so I just changed the