Google indexed wp-content and wp-includes directories

#113506
  • Resolved Canek Goded
    Rank Math free

    I just noticed that Google on November 21, from one day to the next, indexed 395 pages from the wp-content and wp-includes directories.
    I don’t know if it has to do with something I changed in the Rank Math settings. Any idea what happened?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you so much for getting in touch.

    There are no settings in Rank Math that would make those folders indexable.

    However, you can ask Google and other search engines to stop crawling those folders by adding this text to the robots.txt file at WordPress Dashboard > Rank Math > General Settings > Edit robots.txt:

    User-Agent: *
    Disallow: /wp-content/
    Disallow: /wp-includees/
    Allow: /wp-content/images/
    

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Canek Goded
    Rank Math free

    Thanks for the prompt response and support.
    I had already considered that solution but I understand that it is important that Google can crawl those files. Mainly the indexed files are .php files and blank directories.
    From what I am seeing on the net is that it is a problem that is happening to several people.
    I already requested that they be removed in Google Search Console.
    What I don’t know is how I can only not-index those files and folders. Any other ideas what to do?
    Thank you

    Michael Davis
    Rank Math pro

    Hello,

    The way to keep any URL from indexing/crawled is usually by adding a noindex tag. Given these are not wordpress pages that we can add a noindex robots meta tag, the alternative is to use the robots.txt by adding the statements as suggested by my colleague.

    You can also add specific URL paths to the robots.txt if yo only want specific URLs not indexed.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Google indexed wp-content and wp-includes directories’ is closed to new replies.