0

My access logs show some ip addresses accessing cpanel and webmail urls (cpanel..com and webmail..com).

I searched online and found a few recommendations that didn't work.

I tried adding the following to my .htaccess (both in the top directory of my shared hosting account, and in the document root of my website).

AliasMatch "(.*)/cpanel(.*)$" "/"
AliasMatch "(.*)/webmail(.*)$" "/"v

I also tried

Redirect /cpanel /

and

Redirect /cpanel https://<mydomain>.com

My shared hosting is with Hostgator.

Is it possible to block access to those urls from a shared hosting account? Any suggestions on what I can do to block access with Hostgator?

And one last question - is this something worth pursuing? I mean, do most people block access to those urls? Or they simply rely on a strong password to prevent unauthorized access?

Thank you.

4
  • 1
    May be an idea to reach out to Hostgator to find out if they honour .htaccess files.
    – davidgo
    Commented Jul 27 at 7:42
  • 1
    Also, before doing any redirects you need to turn the Rewrite Engine on (if its not already). Does adding the line "RewriteEngine on" to the top of your .htaccess file make things work for you?
    – davidgo
    Commented Jul 27 at 7:44
  • @davidgo I am planning to call Hostgator during regular business hours today. Thanks. And I added the RewriteEngine on and it still didn't work. Thanks.
    – jdias
    Commented Jul 27 at 12:26
  • Do you have access to DNS zones in cPanel?
    – warmwhisky
    Commented Aug 27 at 5:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.