2

On my shared Linux hosting from Hostgator, I had ModSecurity enabled. My website is a Wordpress site, where the Google login redirection URL after successful authentication was being blocked by ModSecurity throwing a 403.

On disabling ModSecurity, the Google login redirection worked fine.

What I wanted to know is, disabling the ModSecurity on my shared hosting and instead using Cloudflare free version on the website, is it a good step for security? What extra thing can I do to ensure website security ?

2
+25

I'd talk to your host about whitelisting certain URLs for ModSecurity. i.e. keep it on, but with modifications. It looks like an OAuth redirect (Google login) triggers the problem you are having.

Your question is broad however, as is the topic of security. What security issues are you attempting to prevent? is probably a counter question to yours. Only once you know the various problems, can you take steps to mitigate them.

Linux firewall security on shared platforms primarily should be handled by your host, but Cloudflare will protect you from DDos attacks. Mod Security deals more with application security.

You mention you are on Wordpress. This link on securing wordpress is a good place to start. https://wordpress.org/support/article/hardening-wordpress/

There are also plugins to prevent unauthorised login attempts such as Wordfence: https://www.wordfence.com/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.