7 Ways to Conserve Hosting Space and Bandwidth

If you are butting up against your hosting provider's limits on bandwidth and storage, there are a few small things you can do to cut down on usage.

Look at your visitor log. There can be resource hogs visiting your site that you aren't aware of, including unwanted search engine robots. Force robots to index only the part of your site you want them to using robots.txt file. See robotstxt.org for tutorials.

Get rid of large images and other media. These are the real hogs of bandwidth and storage limits. If your site doesn't need tons of large images, audio, or video, then don't have them. If your site just requires a few images as window dressing, keep them small; preferably, to the actual size they appear on the website. Use only jpegs or gif files, never bitmap images.

Use captcha for visitors. If you run a website that allows visitor logins and registrations, make sure you use a captcha puzzle to sort out the living from the computers; this will keep automated spam bots from creating phony user accounts to spam your site with.

Turn off the ability to hotlink images. If another website likes your images and wants to use them, they can "hotlink" them. In other words, instead of downloading them and uploading them to their website, they just link directly to them. This has had humurous results in the past, with the image owner swapping out the image for an adult one. Regardless, hotlinking eats up bandwidth and you should disable it on your hosting account. To do this, simply add the following to your .htaccess file, or create a .htaccess file if you don't have one:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?your-domain.com/.*$ [NC]
RewriteRule \.(gif|jpe?g|png)$ - [F]

Clean house. Clean out any files on your hosting account that are cluttering up your storage space and not being used by your site.

Delete extra backups. Backups, needless to say, eat up storage space as they are exact duplicates of your entire account. Although necessary, don't keep more than 2 backups at any one time.

Zip downloadable files. If you provide any downloadable software, ebooks, etc, make sure to zip them all. Zipping compresses and conserves space.