Jun | 20 | 2007

Protect Important Folders in your Blog

Posted by Sophia as Blog Tutorial, Blogging Tools, Tips

Bill Hartzer’s recent post reminds us to mask some of the more sensitive spots in your blog. Although this is only applicable to self-hosted blogs, I think everyone will benefit from this tip of keeping your blog secure. It’s another one of those tasks we should do habitually but often forget.

Here’s how it works: we should not allow sensitive directories on our blogs to list their contents publicly. We do not want malicious visitors getting any hints on how they can compromise our websites. We should not let search engines list irrelevant folders in their results.

Hartzer wrote specifically about denying other people access to one’s WordPress plugins directory, but when you go through your site carefully, you’ll notice several more directories you might want to protect:

Folders You Might Want To Protect

Folders for your photos, music, and videos. Unless you uploaded your multimedia so that anyone can download (or hotlink to) them, it’s best to hide the directory index from other people. This can potentially save you lots of bandwidth!

Folders for your blog admin panel. If possible, avoid revealing which locations need to be hacked to get into your blog.

Folders for your blog themes. This specifically applies to bloggers who have a custom-made theme. Don’t make it devastatingly simple for copycats to clone your blog design.

How to Protect These Directories

Here are ways of protecting your important and sensitive blog folders. You can apply what you’ve learned here to other non-blog folders (if you’re running some other type of website, whether static or dynamic).

Disable directory contents from being listed. JavascriptKit explains how to hide files from being listed inside a directory using .htaccess. Check out the other pages to learn how .htaccess works and other things you can do with it.

Password-protect the directories. Michi Kono has written a tutorial on how to rename and protect the WordPress administration folder (wp-admin). You can also apply this to specific directories one by one.

Prevent searchbots and spiders from accessing those directories. Most search engines follow the rules of skipping directories and files that are listed in a robots.txt file. Here’s Google’s own robots.txt file. To make bots and spiders skip directories and files, create a text file called robots.txt and enter the following:

User-agent: *
Disallow: */feed*
Disallow: */trackback
Disallow: */wp-admin
Disallow: */wp-content
Disallow: */wp-includes
Disallow: *wp-login.php

You can add more directories you wish to hide from search engines by following the format above. Learn more about robots.txt at its own website.

The only catch is that you need access to your blog folders. But if you’ve been uploading images for your blog posts, installing plugins, and adding new themes, you probably know how already.

No related posts.

Related Articles

    No related posts.

Comments (4)

4 Responses

  1. joel badinas

    21|Jun|2007

    Hi,

    With other blogging software like WordPress, this is possible. But if you are using Blogger, like I do, you can’t set your .htaccess file. Do you have a suggestion for this?

  2. Ia Lucero

    21|Jun|2007

    Well, I’d expect Blogger/Google to take care of my data and other security issues I have in mind. Hosted blogging solutions (like TypePad and WordPress.com as well) should behave that way, especially paid ones. And you won’t have any chance to create new directories that need to be protected, so that’s not going to be a problem. :) I hope I was clear enough.

  3. fransisqw

    13|Feb|2008

    I like to play online games and have found few online games in demo mode which are very small to play.
    So please suggest me few web sites where I can fine some good full version online games.

  4. Tech, How to, Software Reviews, Linux, Dog, Make Money Online with AhTim

    31|Mar|2008

    Protect Private Files and Folders…

    Do you have files or folders that you do not want to share with others? I know you will say as long as we do not share our computer login password, we are safe. But how if you are sharing computer with your colleagues in office? Even you do not share, …

  


Our Features

SUBSCRIBE

CATEGORIES

Friends

Bloggy Awards

Blogger Jobs

CONTRIBUTORS

RESOURCES

BLOG METRICS