Web Design. Web Development. Web Hosting.
0 items

How to Disable cPanel WHM tilde temporary URL

Need some help? We are here for you!

We have a very friendly service - Come and chat to us and let us know what you need, we work for an hourly fee and can also provide you a no obligation quote and begin work immediately in most cases. Click "Request Support" or use our Live Chat.

Request support

cPanel/WHM has a weird quirk whereby you can access an account via any URL using a tilde followed by the domain name. For example if your server url was server1.mydomain.com and you had a cPanel account called mydomain you could access that account directly using:
server1.mydomain.com/~mydomain/

This feature is highly useful when needing to access a website in a cPanel account before the domain name is setup / propagated.

But can present SEO related issues / security issues as sites can end up being duplicated on various domains from your server if you are not careful.

Personally we have never used this feature, and it seems too troublesome and sloppy to allow this sort of thing to happen. Luckily you can disable this feature in WHM.

The feature is actually officially from Apache and called mod_userdir. There is a settings panel in WHM that can control all cPanel accounts settings, and also this can be edited per account from cPanel itself. This guide will look at the WHM side and how to disable this feature entirely.

Remove tilde account access in wHM

  1. Login to your WHM interface and navigate to “Security Center / Apache mod_userdir Tweak“.
  2. To totally stop mod_userdir from working until “exclude protection” from all accounts including “nobody“. Make sure “Enable mod_userdir Protection” is checked.
  3. Click “Save” to update the settings, and now mod_userdir will not function! you have successfully stopped Apache from loading tilde accounts through the server domain or any other domain in your system.
0 0 votes
Article Rating
Need some help? We are here for you!

We have a very friendly service - Come and chat to us and let us know what you need, we work for an hourly fee and can also provide you a no obligation quote and begin work immediately in most cases. Click "Request Support" or use our Live Chat.

Request support
Author: Dean WilliamsProfessional PHP Web Developer with expertise in OpenCart Web Development, WordPress Web Development, Bespoke Systems - also a seasoned Linux Server Administrator.


Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments


Share this page..

Let's begin your journey...

Get in touch us now to begin your journey to having a beautifully crafted mobile responsive website. If you're still unsure what we could do for you then take a look at our why us page which includes reviews, or take a look at our portfolio.

We can work on improving existing websites or craft a new stylish website making your business stand out.

You could always catch us by email, telephone, Skype or live chat to us below.


    0
    Would love your thoughts, please comment.x
    ()
    x