• Hi,

    How do I stop people logging onto the index of my websites? I have a few WordPress websites and have only just noticed this problem. if someone visits ‘www.mysite.com/wp-content/uploads’ they can see all of my uploads for that particular website.

    I have checked the permissions on my folders from cpanel and they are set to 755. Another post states this is the correct permission settings.

    I understand there is an alternative way, which is to add an index.html file to each folder. Apart from being time-consuming, i’m also concerned I may miss a folder or future uploads will not be protected.

    Thanks,
    Ollie

Viewing 9 replies - 1 through 9 (of 9 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Edit: Oh I understand, nevermind.

    Thread Starter ohall89

    (@ohall89)

    If I visit other WordPress websites and try to access their upload folder index, I received a 403 Forbidden Error. Why is this not coming up on my site?

    Thanks

    just put an empy index.php file in your upload folder

    Thread Starter ohall89

    (@ohall89)

    Will I need to put an index.php file in each individual folders though? What about future uploads, if they go into a different month/year folder?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Your hosting providers may be able to automate this

    Add this to .htaccess file:
    Options -Indexes

    save it in your upload folder and try browse

    the dot before htaccess is a must the full name is:
    .htaccess

    Thread Starter ohall89

    (@ohall89)

    There are multiple .htaccess files in numerous folders. Is there a specific one it needs to go in? Does it matter where I place the bit of code? I have WordPress code in there.
    Will this automatically add index.php files to my folders?

    Thanks

    the .htaccess file is diffrent solution from the index.php.
    out the .htaccess in the root of the uploads folder and try browsing
    to sub folders and see if it works.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to stop people viewing your uploads folder’ is closed to new replies.