{"id":264,"date":"2005-01-18T01:49:00","date_gmt":"2005-01-18T01:49:00","guid":{"rendered":"http:\/\/jclark.org\/weblog\/WebDev\/Blosxom\/plugins\/deferer\/deferer-0-1i.html"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-30T04:00:00","slug":"deferer-0-1i","status":"publish","type":"post","link":"https:\/\/jclark.org\/weblog\/2005\/01\/18\/deferer-0-1i\/","title":{"rendered":"Fighting Referer Spam with deferer"},"content":{"rendered":"<p>I&#8217;ve been getting swamped by referer spam lately.  Most of it is for domains that appear to have had hosting suspended.  I had already seen a correlation between this referer spam and comment spam; what I didn&#8217;t know (but should have guessed) is that <em>lots<\/em> of folks are seing this.   Tim Bray <a href=\"http:\/\/www.tbray.org\/ongoing\/When\/200x\/2005\/01\/16\/RefererBS\">wrote about the problem<\/a> today, pointing to more info from <a href=\"http:\/\/wordpress.org\/support\/topic.php?id=20956#post-119138\">John Sinteur<\/a> and <a href=\"http:\/\/www.annelisabeth.com\/blog\/archives\/000165.html\">Ann Elisabeth<\/a>.  Apparently all of these referer URIs resolve to a single webhost, with an IP of 161.58.59.8.    <\/p>\n<p>Ann&#8217;s post is one of many on <a href=\"http:\/\/www.annelisabeth.com\/blog\/\">her blog<\/a> about the subject, she is actively pursuing this and trying to get Verio to pull the miscreant&#8217;s hosting.  I suggest reading everything on her homepage for lots of good info.<\/p>\n<p>John&#8217;s post on the WordPress support blog includes PHP code that sends a <code>301 Moved Permanently<\/code> redirection header to any request with a referer URI that resolves to the IP above.  Where does he redirect them?  Back to the referer URI, of course.<\/p>\n<p>Now, that&#8217;s an idea I like.  I liked it so much I wrote a perl version as a <a href=\"http:\/\/blosxom.com\/\">Blosxom<\/a> plugin.  It&#8217;s called deferer, and <a href=\"http:\/\/jclark.org\/download\/deferer\">is available here<\/a>.  Right now, it&#8217;s a one-trick pony, but (when time permits) I intend to expand it to a more comprehensive referer spam solution.  I don&#8217;t know how effective redirecting these requests is- the spider scripts sending the requests may not follow redirects.  Even so, deferer reduces server load (it ends the blosxom invocation early) and saves bandwidth.<\/p>\n<p><strong>Update:<\/strong> Deferer has been updated to version 0+2i, to fix a bug that caused a <code>500 Server Error<\/code> if the referer hostname could not be resolved.<\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been getting swamped by referer spam lately. Most of it is for domains that appear to have had hosting suspended. I had already seen a correlation between this referer spam and comment spam; what I didn&#8217;t know (but should have guessed) is that lots of folks are seing this. Tim Bray wrote about the [&hellip;]<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"class_list":["post-264","post","type-post","status-publish","format-standard","hentry","category-deferer"],"_links":{"self":[{"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/posts\/264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/comments?post=264"}],"version-history":[{"count":0,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/posts\/264\/revisions"}],"wp:attachment":[{"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/media?parent=264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/categories?post=264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jclark.org\/weblog\/wp-json\/wp\/v2\/tags?post=264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}