Contents are locked because a robots.txt file is present in the root folder.

#962301
  • Resolved Qaisar Umar
    Rank Math free

    I am trying to edit my robots.txt file, but it shows ‘Contents are locked because a robots.txt file is present in the root folder’ this error. how to resolve it?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello, we apologize for the issue you are facing with editing your robots.txt file. The error message you are seeing indicates that a physical robots.txt file is present in the root folder of your website, which prevents Rank Math from allowing edits through the WordPress dashboard.

    To resolve this issue, you can follow these steps:

    1. Access Your Website’s Root Folder: Use an FTP client or cPanel File Manager to access the root folder of your website.
    2. Locate the Physical robots.txt File: Look for the actual robots.txt file in the root directory.
    3. Remove the Physical File: Delete this physical robots.txt file from your server.
    4. Edit via Rank Math: After removing the file, you should be able to edit your robots.txt file through Rank Math by navigating to Rank Math SEO → General Settings → Edit robots.txt.

    Here’s a visual reference for your convenience:
    Robots.txt file in root folder

    If you continue to experience issues after following these steps, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further. Thank you for raising this concern!

    Sources:
    I Can’t Edit My Website’s Robots.txt » Rank Math

    Hello,

    Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.

    This message states that you have a physical robots.txt file present in the root folder of your website and that’s why you’re not able to edit the file dynamically from Rank Math. In order to resolve the issue, please try to remove this file via FTP or cPanel File Manager.

    For more details, you can check this URL: https://rankmath.com/kb/cant-edit-robots-txt/#num-1-presence-of-a-physical-file

    Hope that helps and please don’t hesitate to let us know if you have any other questions.

    Hello Jeremy,

    In my WordPress dashboard, I don’t have any plugin installed that can generate a robots.txt file automatically, except for RankMath. I’m trying to delete the robots.txt file using cPanel, but as soon as I delete it, a new one is automatically generated almost instantly. It seems like RankMath is creating the robots.txt file repeatedly.

    What’s the solution for this?

    Hello,

    Please note that Rank Math doesn’t create any physical robots.txt file on your website as it is generated on the fly.

    It seems like the physical robots.txt file is added by your theme or any other plugin you’re using on your website. To determine that, please follow this troubleshooting guide: https://rankmath.com/kb/check-plugin-conflicts/

    If the issue persists, then we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.

    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    We temporarily deactivated the Rank Math plugin on your website but still, the physical robots.txt file was being created. Please check the screencast in the sensitive data section for reference.

    That means Rank Math is not creating the physical robots.txt file on your website. In this case, you can deactivate the other plugins and change the theme temporarily to check which one is creating this file.

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    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 6 replies - 1 through 6 (of 6 total)

The ticket ‘Contents are locked because a robots.txt file is present in the root folder.’ is closed to new replies.