Should I add the IP of the server that hosts my sites to the list of authorized IPs in the wp-admin/.htaccess?

All of my sites were recently hacked and I had to restrict access to the WordPress admin.
The logs are now full of denied connections, but I also see errors coming from the IP of the server that hosting them :

[access_compat:error] [pid 944] [client XXX.XXX.XXX.XXX:45316] AH01797: client denied by server configuration: /var/www/my-website/wordpress/wp-admin/admin-ajax.php, referer: https://www.my-website.com/wp-admin/admin-ajax.php?action=wp_1_wc_privacy_cleanupnonce=XXXX
where XXX.XXX.XXX.XXX is my server IP

Thanks

Topic htaccess server wp-admin security Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.