Support » Plugin: Yoast SEO » Uploads Directory indexed by google

  • Resolved tvhawk


    I’m having a HUGE issue right now. Our entire uploads directory got indexed by google. (Including 100’s of confidential internal documents) As far as I can guess the uploads directory got added to the sitemap that YOAST generates.

    All of these uploads were through a to-do list plugin that uses a custom post type for the to-do list items.

    It may have been fixed by vs 12.7.0’s release:, as I’ve updated to the latest version and I, don’t see them in the sitemap.

    What is the quickest and easiest way of getting all of these files (like hundreds of them) out of google?

Viewing 3 replies - 1 through 3 (of 3 total)
  • There aren’t any changes in 12.7 related to images. Changelog which you have referenced is related to optimization of parsing galleries and minor issue when empty sitemap was rendered for private CPTs.

    Yoast SEO and WordPress core can’t control access to uploads directory. It’s on server level (Apache) and it’s probably issue related to your host. I think that’s same as Attachments Indexed ****** Up and Noindex on wp-content URL’s. Probably, you need to disable mod_autoindex with “Options -Indexes” in .htaccess.

    Thread Starter tvhawk


    Thanks for the response. The attachments were actually excel files.

    I did catch that the directories were browsable and did add the Options -indexes to the htaccess today as well as deleting all of the files that were indexed. (They aren’t actually needed anymore) And I 410ed those directories since they are now empty.

    Through further investigation in google search console it does appear the source of the urls were NOT the sitemap, but were indexed anyways. So – hopefully with the Options -indexes + the above that’ll solve the problem.

    I’ve also used google search console to do a temp removal of the directories in question from the search results while google recrawls all the urls and sees the 410 errors then permanently removes them.

    Plugin Support Jeroen Rotty


    Hi @tvhawk,

    It is correct that Yoast SEO does not alter anything related to folder permissions or indexes. This should be managed on the hosting level.

    Thanks for keeping us in the loop, we’ll go ahead and put this to resolved for now. If you do feel that this should be reopened or you have any other input, please feel free to reply.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Uploads Directory indexed by google’ is closed to new replies.