Results 1 to 6 of 6
  1. #1

    Post How to deny access via www.mydomain.com/~mycpanelusername/

    Is there a way to prevent accessing the website using the domain.com/~username/

    Currently on most (all?) cpanel hosting plans it's possible to access the site via http://www.mydomain.com/~mycpanelusername/.

    Maybe there is something to prevent that as it could cause very serious duplicate content issues.

    Moreover, I think it's a global bug that affects millions of hosting accounts. Yahoo, for example, many times indexes wrong URLs because of that... In many situations, if I knew your cpanel username, I could link to it instead of your domain to remove your site from search engines..
    Last edited by tomaszb3; 05-23-2008 at 11:10 AM. Reason: URL fix

  2. #2
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    Got to WHM --> Security center --> Mod_user dir protection. Enable the protection.
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  3. #3
    Join Date
    Oct 2007
    Location
    Kochi,INDIA
    Posts
    331
    The usage of ~username is actually a feature of apache server

    If you dont want that feature

    Just comment out the line

    LoadModule mod_userdir ...

    in your apache httpd config file
    http://xtendweb.gnusys.net/
    Plug in Nginx & Plug in performance on cPanel systems
    WebOps on cPanel . Deploy webapps to multiple servers and scale horizontally

  4. #4
    Thank you, even though on a shared host it's not possible to do it by myself, correct..?

  5. #5
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    563
    Quote Originally Posted by tomaszb3 View Post
    Thank you, even though on a shared host it's not possible to do it by myself, correct..?
    You will need root-level access to the server in a cPanel/WHM environment to do this. Otherwise, contact your hosting provider. They do have the option to turn this on/off for specific websites if they desire.
    David Grega
    cPanel Technical Product Specialist

  6. #6
    Thanks, will do that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •