Reducing bandwidth on your website

So recently I have been getting bandwidth warnings on two of my top reaching websites. Why? Well, it is because of WordPress plug ins. Not all are optimized and not all features are enabled on the websites that could make them optimal. So lets find out what can help.

  • Hardening your wordpress installation.
  • first, I went to google to look at some tools that could help. Someone recommended Google Insights . This was quite informative.
    • Compression was not enabled for this site – being apache -the recommendation showed that I should enable mod_deflate. My hosting company recommended how to do this in cPanel using the “optimize website” feature. Simple.
  • If you look at AWStats (comes w. cPanel it seems) and click on Hosts->Full List – I saw China, France and Saudi Arabia as pulling the most bandwidth. Now I have not found a good way to narrow down the exact IP’s since my log did not go back to the 22nd when those 5.9GB hogs of bandwidth kicked into high gear. I am onto the culprits I think
    • Use this site to look up countries. I managed to block LOTs of Chinese, German and France sources. I could not find the Saudi source. Basically I added 120.1.0.1 to 120.254.0.1 into Excel made a list and copied and pasted into that site (255 entries). I added this to the end of my .htaccess

[bas]

Order Deny,Allow
Deny from 180.
Deny from 212.
Deny from 123.
Deny from 178.
Deny from 119.
Deny from 120.
Deny from 182.
Deny from 220.
allow from all

[/bas]

Looking into things- this guy says the same thing I am (so I am on a good path). It is a slow path though. What a pain – I might make a program to do this because I have 3 sites threatening to go overboard on the usage and it external influences – not the primary users the sites NOR is it overly large images although I cleared a few up. This guy too – but he makes a leap from a step to “block the bad guys” – but how did he get the bad guy’s IP address? He does not say and I have not yet found it either. A pivot table on usage is the best advice from 2 links up.

Here is a tool to block a whole country – but the list of rules would be huge. Doing it like I did gives a little smaller list.