Have you ever been DoSed or DDoSed? How does it feel when you see your website down, your work disappeared and your customers gone? Or is your website slow and sluggish but you cannot speed it up? Today, in this post, I will show you the Top 3 Free ways to speed up and protect your site from DDoS/DoS attacks.
Let’s start with plugins. For WordPress, there are plugins for automatic blocking IPs with to many requests. This is very efficient, but sometimes, they could be fooled by a spoofed IP attack from hping3 or other tools that send requests with random IPs! On plugin-ish thing is a firewall that protects your site. Contact your provider to see if they have a good firewall up, this could help blocking attacks. However, the router or the pipeline that leads up to your server could be filled with request! So plugin is a start, pretty effective against a basic attack but not so effective against a complex and powerful attack since they will still reach the plugin level of your site. A poplular WordPress plug in is WordFence Security. It includes many features in addition to block attacks.
You should also try caching your site. However, caching could cause many issues that can break your site so don’t cache unless you know what you are doing.
Another plguin-like tool is scripts and htaccess. Through your cpanel, you could see the list of IP addesses that tried to attack your site (mass requests). You could block them using the following script:
deny from 220.127.116.11
deny from 012.34.5.
allow from all”
Change the IP as you wish. but of course, the IP could change, and this is useless against spoofed IP attacks. But still, it is a good way to pin down previous attackers.
Finally, the best way to protect your own site is through a security-focused CDN network such as Incapsula or CloudFlare. If your main focus is speed, CloudFlare is cheaper and faster but might have random downtimes! Also, Incapsula is much more secured and safe. Setting up both of them requires a bit of work changing name servers but if you are unsure, contact your customer support for help!