Can you do a country block in WordPress with the help of cPanel?

Can you do a country block in WordPress with the help of cPanel?

Day by day, the website attack has been increased rapidly. More spammers, hackers and malware attacks are solidly working without interruption. It’s our ideal step to make a big move to protect our website from other suspicious activity. Some would have come across the code injection which is also one of the malicious attacks from hackers move.

There are multiple choices and fix too! But prevention is better than cure right! Let's start with the visitors who visit our website. Plugins of security deeply enrol the visitor who gives more login attempts and doesn’t forget to check whether those attempts of login are from the same or different country. It is easy to block or ignore IP addresses using your website. We recommend you to block those countries which give suspicious activity from their end.

Use .htaccess for blocking suspicious activity countries including the ranges of each IP address. You can see the differences by blocking countries like big and small. One of the full-fledged countries is the US. The US is said to be a well-developed and bigger country in the world. If you block the US then you would get a big loss more than you expect. But blocking a small country won’t give you any big problem.

Let us find the better solution for blocking small as well as a big countries in detail:

As a WordPress user, you must know to access the .htaccess file without fail.

Step 1: Go to the account “cPanel” and then go to section “Files”. There you can see more options like file manager, disk usage, backup, images, FTP accounts, file restoration, directory privacy, FTP connections and backup wizard.

Step 2: Choose the menu “File manager” and so, you can open publc_html. Just cross-check the directory opened is home directory or publc_html directory.

Step 3: Use the menu of vertical navigation for moving inside the root directory. Start searching .htaccess also look on the option “show hidden files” whether it is enabled or not. If it is enabled, you can see the .htaccess file. If it is not enabled then enable it for viewing the .htaccess file.

Step 4: At the cPanel top-right corner you can see the option to view hidden files. By double-tapping on the .htaccess file, you can’t view it normally. Instead, you can do right-click on the .htaccess file to make necessary changes for blocking the countries.

Step 5: By now, you will get a pop-up window that shows the button “Edit”. Tap on the button “edit”. Simultaneously, find out the ranges of IP addresses and so, you can copy-paste into the .htaccess file.

Kindly make use of the .htaccess file to block suspicious activity country by preventing your website. Brute force attacks are more common all over the world. Thank you!
Author
kumkumsharma
Views
219
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from kumkumsharma

Top