Remember: If Google can see your index of view.shtml , so can the attackers. Turn off directory indexing today, and replace raw directory views with proper default documents. Your security and your search rankings will thank you.
location / { autoindex off; } To specifically block access to view.shtml raw files: index of view.shtml
Use the following search query to see if Google has already indexed your exposed directories: site:yourdomain.com intitle:"index of" "view.shtml" How to Disable Directory Indexing (The Fix) Preventing the index of view.shtml problem requires disabling directory listings on your web server. For Apache Servers ( .htaccess or httpd.conf ) Add the following line to the relevant configuration file or an .htaccess file inside the directory: Remember: If Google can see your index of view
Options -Indexes If you need to disable indexing globally, ensure your <Directory> block does not include +Indexes . To also prevent access to .shtml source, add: location / { autoindex off; } To specifically
location ~ \.shtml$ { internal; } Open IIS Manager, select the directory, double-click "Directory Browsing," and select "Disabled" in the Actions pane. Alternative: Using index.shtml Correctly In many cases, website owners actually intend to serve a default SHTML page when a user visits a directory. The proper configuration is to use DirectoryIndex (Apache) or index (Nginx) to load view.shtml as the default page, not as a directory listing.
If you see "Index of /anyfolder/view.shtml" with a list of files, your server has directory listing enabled for that path.
Enter a URL that ends with a directory name and a trailing slash, followed by view.shtml as a folder: https://yourdomain.com/anyfolder/view.shtml/