Reputation: 11
The Rewrite rule is automatically creating in the htaccess file. even I have make the permission to 444, after sometime it changes to 777 automatically. I found some unwanted code pages in jquery/external/blooket-login.php, I removed it, after sometime again it was there.
The question is, how do I make my custom PHP website secure? I am using namecheap whm hosting.
Also please note that when I search my website in google, and then when click on few specific links, it redirects me to some unknown websites, like an ad, it redirects me to somewhere else. due to which I am losing my users confidence.
I have scanned my website with cpanel virus scanner, I found few links which I destroy at the end but still it is not helping. so I want to know how to make secure the cpanel from malicious / malware attacks.
Upvotes: 0
Views: 166
Reputation: 337
Your website may be compromised, which is causing the .htaccess
file permissions to reset and malicious code to reappear. To secure it, manually clean up the unwanted code from .htaccess
and PHP files, then set .htaccess
permissions to 444 to prevent changes. Also, enable two-factor authentication (2FA) in cPanel, use a strong password, and monitor access logs for any unusual activity. If the issue persists, check for unauthorized cron jobs or PHP scripts that may be reinfecting your files, and consider using a more advanced malware scanner, like ImunifyAV, if available. Lastly, use Google Search Console to reindex your site to remove any spammy links.
Upvotes: 0