Skip to main content
Made htaccess snippet look like code.
Source Link
paulmorriss
  • 15.4k
  • 1
  • 39
  • 59

Google is probably trying them because someone has linked to those pages on their website or Google is assuming their is an index page for all of your directories of which there are none.

You have two possible solutions:

  1. Do a 301 redirect from the /xyz/ to /xyz/index.html, etc. This will tell Google that /xyz/ has moved to /xyz/index.html and to stop looking for it.

  2. Tell Apache to use index.html as the index file for your directories. You can do that by placing this snippet in a file called .htaccess and placing it in your web root:

    DirectoryIndex index.html

DirectoryIndex index.html

If you choose option two be sure to also use canonical URLs on your index.html pages so you avoid duplicate content issues.

Google is probably trying them because someone has linked to those pages on their website or Google is assuming their is an index page for all of your directories of which there are none.

You have two possible solutions:

  1. Do a 301 redirect from the /xyz/ to /xyz/index.html, etc. This will tell Google that /xyz/ has moved to /xyz/index.html and to stop looking for it.

  2. Tell Apache to use index.html as the index file for your directories. You can do that by placing this snippet in a file called .htaccess and placing it in your web root:

    DirectoryIndex index.html

If you choose option two be sure to also use canonical URLs on your index.html pages so you avoid duplicate content issues.

Google is probably trying them because someone has linked to those pages on their website or Google is assuming their is an index page for all of your directories of which there are none.

You have two possible solutions:

  1. Do a 301 redirect from the /xyz/ to /xyz/index.html, etc. This will tell Google that /xyz/ has moved to /xyz/index.html and to stop looking for it.

  2. Tell Apache to use index.html as the index file for your directories. You can do that by placing this snippet in a file called .htaccess and placing it in your web root:

DirectoryIndex index.html

If you choose option two be sure to also use canonical URLs on your index.html pages so you avoid duplicate content issues.

Source Link
John Conde
  • 86.4k
  • 27
  • 147
  • 241

Google is probably trying them because someone has linked to those pages on their website or Google is assuming their is an index page for all of your directories of which there are none.

You have two possible solutions:

  1. Do a 301 redirect from the /xyz/ to /xyz/index.html, etc. This will tell Google that /xyz/ has moved to /xyz/index.html and to stop looking for it.

  2. Tell Apache to use index.html as the index file for your directories. You can do that by placing this snippet in a file called .htaccess and placing it in your web root:

    DirectoryIndex index.html

If you choose option two be sure to also use canonical URLs on your index.html pages so you avoid duplicate content issues.