cancel
Showing results for 
Search instead for 
Did you mean: 

Index of directory folder

Index of directory folder

How do I hide the index of directory folder from Google search

 

IndexOfDirectory.png

2 REPLIES 2

Re: Index of directory folder

Hi @hea hooi_ngoi,

 

Not able to see attached image but assuming that you are having "index.php" in URL and on Google search, it is appearing. If yes, then I am assuming you already removed the index.php from website URL, by doing the admin configuration setting. Now, generate the sitemap and submit it to Google. 

 

Let me know if you need more details here. Happy to assist you.

 

if issue solved,Click Kudos & Accept as Solution

Re: Index of directory folder

Hello @hea hooi_ngoi,

 

Please add below content in robots.txt file of root directory or  check attached screenshot https://www.screencast.com/t/0htNIV7t
2018-10-26_14-57-47.jpg

Disallow: /media/

 

 

Please check below standard robots.txt of Magento 2 

 

User-agent: *

# Directories
Disallow: /app/
Disallow: /bin/
Disallow: /dev/
Disallow: /lib/
Disallow: /phpserver/
Disallow: /pkginfo/
Disallow: /report/
Disallow: /setup/
Disallow: /update/
Disallow: /var/
Disallow: /vendor/
Disallow: /media/ # Paths (clean URLs) Disallow: /index.php/ Disallow: /catalog/product_compare/ Disallow: /catalog/category/view/ Disallow: /catalog/product/view/ Disallow: /catalogsearch/ Disallow: /checkout/ Disallow: /control/ Disallow: /contacts/ Disallow: /customer/ Disallow: /customize/ Disallow: /newsletter/ Disallow: /review/ Disallow: /sendfriend/ Disallow: /wishlist/ # Files Disallow: /composer.json Disallow: /composer.lock Disallow: /CONTRIBUTING.md Disallow: /CONTRIBUTOR_LICENSE_AGREEMENT.html Disallow: /COPYING.txt Disallow: /Gruntfile.js Disallow: /LICENSE.txt Disallow: /LICENSE_AFL.txt Disallow: /nginx.conf.sample Disallow: /package.json Disallow: /php.ini.sample Disallow: /RELEASE_NOTES.txt # Do not index pages that are sorted or filtered. Disallow: /*?*product_list_mode= Disallow: /*?*product_list_order= Disallow: /*?*product_list_limit= Disallow: /*?*product_list_dir= # Do not index session ID Disallow: /*?SID= Disallow: /*? Disallow: /*.php$ # CVS, SVN directory and dump files Disallow: /*.CVS Disallow: /*.Zip$ Disallow: /*.Svn$ Disallow: /*.Idea$ Disallow: /*.Sql$ Disallow: /*.Tgz$

--
If my answer is useful, please Accept as Solution & give Kudos