Google Search Console: Index Coverage Error for /wp-includes/ php files

Recently, without changing anything on my website, Google search console started flagging 80 index coverage errors, shown as "Server error (5xx)". When I go look into it, what it's flagging are php files in the /wp-includes/ folder, which Google shouldn't be even trying to index. My xml sitemap doesn't include these files. I don't understand why google is trying to index and then flagging them.

Any ideas on why this is happening and what I can do to stop it?

Topic 500-internal-error google-search Wordpress

Category Web


The cause is automatic indexes on folders on your server. For example https://www.yoursite.com/wp-includes/ shows an index of all the files in the folder.

The solution is to turn off indexes

add this to .htaccess

Options -Indexes

If you can’t do this then tell your host to disable indexes


Check that wp-includes is excluded for index in robots.txt

User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.