Archive for August 26th, 2007

Hacking Someone’s Search Ranking? Don’t let it happen to you.

Sunday, August 26th, 2007

Sarah was really interested in shoes. She loved to buy them, wear them, and talk about them. Sarah decided one day that she loved shoes so much that she would make a website dedicated to talking about shoes. Sarah worked hard and made her site the best that it could be. Pretty soon, her site gained number one rank for shoe forums on Google. Users started registering for her forum and Sarah found out she wasn’t the only one with a passion for footwear. Many of these users used to talk about shoes on another site dedicated to all types of fashion. When they found Sarah’s forum, they left the other site. This didn’t make Joe, the owner of the other site, very happy. Joe decided that he was going to make Sarah disappear from Google. In a month or so, Sarah’s site was all but gone from Google and the few fans she had started shrinking for lack of new users and interesting topics. How did Joe do it?hacker

While the story above was hypothetical, something most of us don’t think about until we have a site with a decent amount of traffic is that there’s always going to be someone who doesn’t want to you be highly ranked on search engines. One thing you might not realize is that there’s a relatively easy way to hack your site’s search engine rank. This is especially the case with Google. One of the main Google ‘rules’ listed on their webmaster help center is: Don’t create multiple pages, sub-domains, or domains with substantially duplicate content. This means Google doesn’t want to see pages and pages of the same “stuff” on your domain.

“Then this doesn’t apply to me!” you might say. However, lets think about what Google defines as a “page”. For Google, a “page” can be any document it crawls that has it’s own unique URL. So, yourdomain.com/file.php, yourdomain.com/file.php?hello=world, and yourdomain.com/file.php?hello=mom can all be seperate pages to Google. “Still doesn’t apply to me… my links are all uniform and I use Apache rewrites.” OK, so your pages are all correctly linked on your site. But what’s to stop me or someone else from linking to a creative spin on one of your pages? What if a devious person cleverly dispersed hundreds of these links across a variety of pages. When Google crawls these pages, it will crawl these links to your site, and find a potentially endless list of “duplicate” pages. As far as Apache rewrites go, you might think you are protected but if you use rewrites such as this: yourdomain.com/avoid-seo-hack-32.html, and 32 is some unique id that you are using to serve your content, then what’s to stop me from linking to: yourdomain.com/duplicate-content-32.html. Chances are, this is going to work and its going to look even worse to Google.

<?

// —————————
// SEO HACK FIX
// the way the url should look
$correct_url = “/avoid-seo-hack-32.html”;

// compare url to correct url

if ($correct_url != $_SERVER[’REQUEST_URI’])
{
// the page url didn’t match, so we 301
// direct to the correct url

header(“Location: {$correct_url}”);
exit();
}
// —————————
?>

“Ahhh! So how can I protect my site from this?”

The solution is simple… I wrote a few lines of php that should help you out. Basically, all you need to do is determine the correct URL for your page, then check the URL that has been requested. If it doesn’t match, then redirect the user to the correct URL. Once you have done that, you will be protected against this hurting your SEO score… either accidentally or maliciously.

I am sure someone looking for ways to hack a sites search rankings will read this blog and go to work with their devious plan. However, now that you know how to avoid it, your site will be safe.

Close
E-mail It