The Key To Being Anti-Social – How To Deal With Diggs, Slashdot, Delicious, ect

Posted on: September 30th, 2006 by Jeremy Schoemaker

We had a few off the wall questions during last weeks radio show about how I deal with digg and the other social networks. Well I have a dedicated server that I use pretty much just for my blog so its not that hard however some people made the point that most bloggers that do shared hosting or whatever just cant handle the traffic that a DIGG or something brings and that my friends is just not planning for success!

If your server is having problems dealing with diggs put this code in your .htaccess and it will redirect them to a cached mirror of your page.

!start code

RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^192.168.1.2$
RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx
RewriteCond %{QUERY_STRING} !(^|&)coral-no-serve$
RewriteCond %{HTTP_REFERER} ^http://(www.)?digg.com [OR]
RewriteCond %{HTTP_REFERER} ^http://(www.)?slashdot.org [OR]
RewriteCond %{HTTP_REFERER} ^http://(www.)?slashdot.com [OR]
RewriteCond %{HTTP_REFERER} ^http://(www.)?fark.com [OR]
RewriteCond %{HTTP_REFERER} ^http://(www.)?somethingawful.com [OR]
RewriteCond %{HTTP_REFERER} ^http://(www.)?engadget.com [OR]
RewriteCond %{HTTP_REFERER} ^http://(www.)?boingboing.net [OR]
RewriteCond %{HTTP_REFERER} ^http://(www.)?del.icio.us
RewriteRule ^(.*)$ http://www.shoemoney.com.nyud.net:8080/$1 [R,L]

!end code

What you need to edit:

RewriteCond %{REMOTE_ADDR} !^192.168.1.2$ – This should be your ip so you dont see the cached version

RewriteRule ^(.*)$ http://www.shoemoney.com.nyud.net:8080/$1 [R,L] – change the shoemoney.com part to our website but make sure you keep the nyud.net:8080 part intact.

How this works? Your webserver sees the referal from the social site and points people to the mirrored cached copy of your website thus not hammering on yours.

(This tip is also included in a lot of digg comments)

For the demonstration of this article I will use it. If you come from the digg link you will be redirected (dont feel that you need to digg this article though)

Post written by Jeremy Schoemaker

Hi I am Jeremy Schoemaker and ShoeMoney.com is my blog. 99% of the post here are done by me but you will see others occasionally make guest posts. This blog is fun to write but for my day job I run several online companies.

More about Jeremy at http://www.shoemoney.com!

Have You Read:

twitterrich-20091020-085652

How To Make 15,000.00 In 1 Month Just By Tweeting

48 Comments. What Say You?

  1. ShoeMoney
    September 30, 2006 at 9:23 pm

    also dont be a dumbass like me and double post

  2. Dino
    October 1, 2006 at 1:48 am

    Haha great tips…keep them coming shoemoney!

  3. Markus
    October 1, 2006 at 9:45 am

    When would you recommend setting this up? Being that you can’t really predict when and what article will get the spike.

  4. ShoeMoney
    October 1, 2006 at 11:08 am

    you can run it all the time

  5. Tom Vendetta
    October 1, 2006 at 11:39 am

    Came to this from digg and my RSS feed. Did not redirect me either times =\

  6. micsaund
    October 1, 2006 at 11:47 am

    How often does nyud.net slurp content into the cache? Maybe it will pull the cache upon the first access so there is effectively no waiting period required.

  7. Daniel
    October 1, 2006 at 11:54 am

    I didn’t get redirected?

  8. Bob
    October 1, 2006 at 12:00 pm

    Dumb question: How does one get or set up a, as it says above, “the mirrored cached copy of your website” ?

  9. ShoeMoney
    October 1, 2006 at 12:32 pm

    i think it checks back hourly for a new version

  10. Bob
    October 1, 2006 at 12:49 pm

    Dumb question: How does one get, find or set up a, as it says above, “mirrored cached copy of your website” ?

  11. PreZ
    October 1, 2006 at 1:48 pm

    I got dugg pretty hard just last week and what I did was save the page of my blog as .htm upload it to my server and did a 301 redirect to that html page. The load and bandwidth significantly dropped.

  12. Rose
    October 1, 2006 at 1:52 pm

    Informative post!

  13. missi
    October 1, 2006 at 3:59 pm

    Great idea. Thx for the hint. :)

  14. ShoeMoney
    October 1, 2006 at 5:43 pm

    just by using that domain it works

  15. JeffPosaka
    October 1, 2006 at 6:49 pm

    Now I just need to write more articles…
    Thanks for the great piece of code.

  16. SirNuke
    October 1, 2006 at 9:15 pm

    CoralCDN does not automatically rewrite links, so any pages that do not contain a referer from Digg/* will not get redirected. Many anaylists of the Digg/* Effect show that most vistors don’t go past the first page, so this may not be a problem.

  17. Technology Slice
    October 1, 2006 at 9:26 pm

    Great post. Thanks for the tip.

  18. fivecentnickel.com
    October 2, 2006 at 10:01 am

    What if you’re running WP-Cache on WordPress? That should take care of the caching, right? So would you still need this?

  19. Mike Papageorge
    October 3, 2006 at 4:26 am

    This code looks to be useful, but if the user doesn’t pass referers (many firewalls block sending referers) they won’t get redirected.

    Also, I tested the code today from the Digg article and went thru to your homepage where the current title is “One Year Of Blogging…. Pretty Wild”. Kinda confusing to the user (me) who clicked a link in Digg marked “Be Anti-Social – How To Deal With Diggs, Slashdots, Delicious And The Like”.

    Something amiss in your .htaccess file?

  20. Andy
    October 10, 2006 at 4:09 pm

    Would this still make statcounters increase?

  21. StephenJ
    October 24, 2006 at 11:54 pm

    It looks to me like that last line should be changed a little, ie

    RewriteRule ^/(.*)$ http://www.shoemoney.com.nyud.net:8080/$1 [R,L]

    Otherwise won’t you get a double slash in the destination address? (Keep in mind that I am new to mod_rewrite, so I could be wrong here…)

  22. Dave
    January 30, 2007 at 10:29 am

    Isn’t it true that this requires that the user’s browser sends a referrer, which many people block, negating the solution in many cases?

  23. coop
    April 17, 2007 at 6:12 pm

    i just implemented this on my blog… but it is showing the main page… not the post, what should i change?

  24. List of 150 Social Bookmarking Site
    August 28, 2008 at 10:14 am

    Instead of digg, slashdot and delicious, you still could yous the list of 150 social bookmarking site above. You also could be deal with them

  25. Portland window cleaning
    August 21, 2009 at 2:34 am

    Excellent.

    That clears up a problem I’ve been having.

Leave a Reply