Tuesday, January 31, 2012

How To Participate In An Internet Blackout (Like The SOPA Protest)

How To Participate In An Internet Blackout (Like The SOPA Protest):

sopa protestYou may have noticed on January 18th that plenty of big websites participated in an Internet blackout as a protest of the US government’s proposed SOPA legislation. Despite the SOPA plans being dropped for now, there are still numerous similar acts of legislation being proposed across the world.


If you’re planning on supporting future protests, or just generally curious, you might like to know what Google recommends you do in order to ensure your search rankings aren’t affected in any way while you are protesting. We’ll also let you know the quickest and easiest ways to black out your site.


Use A 503 HTTP Status Code


Google representative Pierre Far suggests that an HTTP status code of 503 is important in order to tell Google that this isn’t your normal page content. Generally this is used when the site is offline for server updates, but it works equally well for protesting.


sopa protest


The reasoning behind this can be seen easily if you consider that Google originally saw that you had a page full of, say, cat pictures and great content about cats. If they then crawl the site and the page says “We’re currently participating in an internet blackout as a protest” it looks to Google as if your page is a pretty awful resource when it comes to cats. Your site would drop in the pagerank system for cat information, which is probably not an ideal situation for your site.


Also, if all of your pages say the same thing, Google is going to think your content is duplicated all over your site and that you’re some sort of spam site. You really don’t want this!


Basically, the 503 HTML status says to the crawler “Hold on, this page is not what it normally is, so come back later”.


What Not To Do


To return the 503 error, it’s not advised to edit your robots.txt file as a robots.txt file change will ensure your site will not be indexed for a few days afterwards. Changing your DNS settings is also not advised. Basically, don’t do anything that takes a long time to change, to take effect or to revert.


Creating A 503 HTML Status Code For Your Site Using PHP


As long as you have access to your root directory for your website, this is a really easy process. Open up your favourite text editor and write this:



<?php
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 3600');
?>
<!DOCTYPE html>
<html><head>
<title>503 Service Temporarily Unavailable</title>
</head><body>
<h1>Service Temporarily Unavailable</h1>
<p>We're currently participating in an internet blackout as a protest.
Please try again later.</p>
</body></html>


Then save your file as 503.php and drop it into your site’s root directory.


Obviously, you can change the human-read text to whatever your message is, including images and regular HTML elements.


A Quick WordPress Plugin To Black Out Your Site


For the SOPA blackout there was a handy WordPress plugin to black out your site. However it used a 302 redirect status code rather than the recommended 503 status code. If you want to know more about the SEO effect of using a 302 rather than a 503, read this article by Matt Cutts.


Despite this, if you’re not bothered by a bit of SEO damage, a plugin like this could allow you to quickly blackout your site without access to your root directory or without the need to learn too much technical detail.



This particular plugin was set to blackout just for the day of January 18th, but for future protests there will no doubt be more plugins available. Just search for one which uses a 503 status and you should be fine.


Let us know what other methods protestors could use on their sites if another Internet blackout is planned.


Image Credit: ShutterStock




No comments:

Post a Comment

[Please do not advertise, or post irrelevant links. Thank you for your cooperation.]