disable directory listing

#677310
  • Resolved Anonymous
    Rank Math free

    Hi,
    I have an error message:
    Directory Listing seems to be enabled on your server.

    I added the following code to the .htaccess file:
    #Disable directory listing
    Options All -Indexes

    Then found that:
    The directory listing was disabled for all directories but not the wp-content. It has been resolved by adding additional code to the .htaccess file:
    RewriteEngine on
    RewriteRule ^wp-content/?$ – [F]

    I still have the error message in my Rank Math SEO analyser.

    Any thought as to whether the edits have worked or not or what i should do please would be much appreciated!
    Thank you.

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

    I’m sorry to hear that you’re still experiencing issues with the directory listing error message in your Rank Math SEO analyzer. It seems like you’ve made some changes to the .htaccess file to disable directory listing, but the issue persists.

    To ensure that the edits have worked and to resolve the error message, you can try adding the following code snippet to your .htaccess file:

    Options -Indexes

    This code will explicitly disable directory listing for all directories, including the wp-content directory. After adding this code, please save the changes and check if the issue is resolved.

    If you continue to experience issues or need further assistance, please feel free to reach out to us by assigning this ticket to a human agent using the available buttons. We’ll be happy to help you further.

    Thank you for bringing this concern to our attention!

    Sources:
    Common robots.txt Issues & How to Fix Them » Rank Math
    Why Are Posts Redirecting to www or Non-www Incorrectly?
    I Can’t Edit My Website’s Robots.txt » Rank Math
    How To Exclude Rank Math Sitemaps from Caching » Rank Math

    Anonymous
    Rank Math free

    Hi, it reads:
    #Disable directory listing
    Options -Indexes

    and i still get the error message.

    Thank you for your suggestion.
    Anything else i could try?

    Thanks

    Hello,

    If you have already applied the code, head over to Rank Math > Status & Tools > Database Tools > and click the Clear SEO Analysis and Remove Transients buttons to flush the SEO Analysis cache (if not yet)

    Flush

    Once done, clear your website and any server-level caching on your site before doing the Sitewide analysis again.

    Let us know how this goes.

    Anonymous
    Rank Math free

    Yay that worked and gave green to lots more items! Thank you so much 🙂

    Hello,
    
    You’re welcome.

    We are super happy that this issue is already resolved. If you have any other questions in the future, know that we are here to help you.
    
    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.
    
    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
    
    Thank you.

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

The ticket ‘disable directory listing’ is closed to new replies.