cancel
Showing results for 
Search instead for 
Did you mean: 

Protect Cpanel access

Hello, for security purpose, I want to block the direct access of the cpanel. www.websitename.com/cpanel If anyone tries to acess this url will be redirected to another page How to do that? Thanks
19 REPLIES 19
Helper VI
Helper VI

Re: Protect Cpanel access

@varghese you can try with an .htaccess rule. Add this to your .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^cpanel/(.*)$ /$1 [R=301,NC,L]
</IfModule>

Also check that you .htaccess has this enabled:

Options +FollowSymLinks
RewriteEngine On

Hope it helps!

If you find my replies helpful, give me a like or kudo Smiley Happy
And if I solved your issue, mark it as solution Smiley Very Happy

Re: Protect Cpanel access

Thanks @jpablo

I added this code to my htaccess file inside public_html folder. But  still ican access cpanel in the url

Options +FollowSymLinks
RewriteEngine On

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^cpanel/(.*)$ /$1 [R=301,NC,L]
</IfModule>

Helper VI
Helper VI

Re: Protect Cpanel access

@varghese and with this:

Redirect 301 /cpanel /

?

 

Hope it helps!

If you find my replies helpful, give me a like or kudo Smiley Happy
And if I solved your issue, mark it as solution Smiley Very Happy

Re: Protect Cpanel access

@jpablo Sorry no luck.

Helper VI
Helper VI

Re: Protect Cpanel access

@varghese looking into this, it seems that it need to be a server-side configuration. So I don't think you can disable that. Sorry

 

Hope it helps!

If you find my replies helpful, give me a like or kudo Smiley Happy
And if I solved your issue, mark it as solution Smiley Very Happy

Re: Protect Cpanel access

Will godaddy  provide any support for this?

Employee
Employee

Re: cpanel login

Hi varghese,

 

While I don't really recommend doing that as it could very well cause you problems in the future, you could delete the CNAME record in your DNS Manager for your domain that reads "cpanel".

 

That will make it so that does not work anymore.

 

 

Hope this helps! 

~Jay
Helper VI
Helper VI

Re: Protect Cpanel access

@varghese I don't think so, since that change would affect the whole server, not just your account/domain.

However, give them a call and find out.

 

As long as your passwords are strong, you should not worry too much about it. Also, you should change your password in a regular basis. That way you can protect it better.

But if you really don't want cpanel access, you can switch to another plan, like VPS, where you can disable it for yourself or don't even have cpanel at all. However, it's pricier than shared webhost.

 

Hope it helps!

If you find my replies helpful, give me a like or kudo Smiley Happy
And if I solved your issue, mark it as solution Smiley Very Happy

Re: Protect Cpanel access

Thanks, I call them earlier but they don't have any idea at all on how to do that.

Helper VI
Helper VI

Re: Protect Cpanel access

@varghese oh, well. Don't worry too much. Just keep your passwords secure and change them regularly.

 

If it's solved, you should mark the reply as solution in order to get the thread marked as solved.

 

Glad to help!

If you find my replies helpful, give me a like or kudo Smiley Happy
And if I solved your issue, mark it as solution Smiley Very Happy

Re: Protect Cpanel access

@jpablo Thats not going to work.

Helper VI
Helper VI

Re: Protect Cpanel access

@varghese well, then you should contact support and ask them to disable it for you. Maybe they will, maybe they don't.

 

Hope it helps!

If you find my replies helpful, give me a like or kudo Smiley Happy
And if I solved your issue, mark it as solution Smiley Very Happy

Re: Protect Cpanel access

@jpablo I contacted them many times, they don't know what to do?? Strange.

Helper VI
Helper VI

Re: Protect Cpanel access

@varghese being in a shared hosting means that you are where others are too. As being the cpanel option a server setting, if they disable it, they disable it for everyone, not just for you.

If you really don't need cpanel or don't want cpanel publicly accessible, then you should go with vps and setup as that.

 

There's nothing I can do for you.

 

Hope it helps!

If you find my replies helpful, give me a like or kudo Smiley Happy
And if I solved your issue, mark it as solution Smiley Very Happy

Re: Protect Cpanel access

@jpablo if i go for VPS they also have the same domianname/cpanel

It open the cpanel login page liek this - http://prntscr.com/g59jbl

Helper VI
Helper VI

Re: Protect Cpanel access

@varghese if you go to self managed VPS you don't have cpanel, just plain ssh. But also, if you go with the other plans, I think you can disable that from WHM.

 

Last thing, tho. Have you tried creating a cpanel folder in your domain root?

 

Hope it helps!

If you find my replies helpful, give me a like or kudo Smiley Happy
And if I solved your issue, mark it as solution Smiley Very Happy

Re: Protect Cpanel access

@jpablo i tried creating a folder cpanel in my root and put a index.php file for redirection. BUt it didn't work

Community Manager
Community Manager

Re: Protect Cpanel access


@varghese wrote:
Hello, for security purpose, I want to block the direct access of the cpanel. www.websitename.com/cpanel If anyone tries to acess this url will be redirected to another page How to do that? Thanks

Hey @varghese. Welcome to GoDaddy Community! From what I've found, the /cpanel, /webmail, and /whm redirects are all part of the cPanel platform. To disable these, you need admin access to the cPanel install itself, which you wouldn't have on a shared hosting platform. If you had a VPS or Dedicated Server with cPanel installed, you should have the needed access to configure cPanel in this way. I found a Stack Overflow post that discusses this. Hope that helps. 

 

JesseW - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.

Re: Protect Cpanel access

@JesseW

What about 2FA for cpanel?