paint-brush
How to Protect Your WordPress Site Against DDoS Attacksby@jyotiray1
539 reads
539 reads

How to Protect Your WordPress Site Against DDoS Attacks

by Jyoti RayAugust 25th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

A DDoS attack drastically slows down your website and makes it inaccessible to users. This can hurt your business’ revenue and provide a bad user experience. In 2018, a famous developer platform - GitHub, was hit by a DDoS attacks. The DDoS is the most common attack that many web admins often face. There are some methods for how to prevent these attacks. These include disabling XML-RPC and REST API in WordPress and installing a WAF (Website Application Firewall) on your site.

Company Mentioned

Mention Thumbnail
featured image - How to Protect Your WordPress Site Against DDoS Attacks
Jyoti Ray HackerNoon profile picture


As your website begins to grow, there are many security threats you might often face, such as DDoS attacks, phishing attacks, SQL injection attacks, cross-site scripting (XSS), password attacks, and many more.


Amongst them, a DDoS is the most common attack. A DDoS attack drastically slows down your website and makes it inaccessible to users. This can hurt your business’ revenue and provide a bad user experience.


Below are some methods for how to prevent these attacks:

What is a DDoS Attack?

A DDoS or Distributed Denial of Service attack is a type of cyber attack that slows down a website by flooding the server or network with fake bot traffic.


Attackers utilize multiple infected computer devices to send a flood of tens of thousands of requests to the target server.


A web server can only respond to a certain number of requests and a DDoS attack throws more requests at the server than it can handle. As a result, the webserver becomes unresponsive.


In 2018, a famous developer platform - GitHub, was hit by a DDoS attack.



1. Choose a Premium Hosting Provider


When it comes to securing your website from hackers, you can’t deny the importance of a quality web host.


There are hundreds of web hosts out there; however, not all are good performance-wise. Some web hosts perform badly even under a moderate strain. So if you face a DDoS attack, your website will be unavailable to the users.


2. Install a WAF (Website Application Firewall) on Your Site


If you have been using WordPress for a while, you may know what a Website Application Firewall (WAF) is.


WAF is a security system that adds a layer of protection between your site and web traffic. It has an intelligent algorithm that automatically blocks all the incoming malicious traffic and keeps your website safe.


3. Disable XML-RPC and REST API in WordPress


By default, XML-RPC is enabled, and there is no option on your WordPress dashboard to disable it.


XML-RPC is a feature that allows you to connect your WordPress site with any 3rd party application. For instance, you can connect your WordPress mobile app with your WordPress site. It seems to be helpful in a few ways, but it can cause some serious security issues like DDoS attacks. That’s why we suggest disabling it.


You can easily disable the XML-RPC option by accessing your .htaccess file. You can open the .htaccess file through your hosting’s cPanel account. Then copy and paste the code lines at the end of the file.

Once done, don’t forget to save the file.


4.Disable REST API in WordPress


REST API is a type of function that allows WordPress plugins to send/ receive data or delete content. This function allows any third-party applications to access your WordPress site.


However, this also allows hackers to exploit your website. Therefore, we recommend disabling it.


Disabling the REST API in WordPress is straightforward. Just install this plugin and you are good to go. This plugin doesn’t require any additional setup process.


5.Start Using a CDN


A Content Delivery Network (CDN) is a group of servers placed across the globe to speed up access to your website.


A CDN caches your website’s files and stores them in their data centers. When someone visits your website, your CDN service loads your website from their data center instead of your web hosting server.


This drastically decreases your website’s overall loading time and also helps to reduce the strain on your server.


CDN also prevents DDoS attacks by filtering out any malicious traffic.


Conclusion

The DDoS attack is a type of malicious network attack that many web admins often face. It makes your website hard to access, drastically slows down your website, and most importantly, hurts your business’ revenue.