Assistance Needed for “robots.txt File Is Not Writable” Issue on My Website

#952019
  • Resolved Elia Jon
    Rank Math free

    Dear RankMath Support Team,

    I am encountering an issue with my website Outback Steakhouse Menu. The error message “robots.txt file is not writable” appears, preventing me from making any changes to the file.

    Here are some details about the issue:

    I am using RankMath to manage my SEO settings, including the robots.txt file.
    My hosting platform allows manual file edits, and I have checked the file permissions, which are currently set to 644.
    Despite ensuring the correct permissions, RankMath cannot write to the file.
    Could you please help me resolve this issue? Is there a specific hosting configuration or setting I need to adjust so that RankMath can access the file correctly?
    Thank you so much for your help.
    Best regards

Viewing 1 replies (of 1 total)
  • Hello,

    We apologize for the issue you are facing with the "robots.txt file is not writable" error on your website. Thank you for providing detailed information about the problem.

    This error typically occurs when Rank Math cannot modify your robots.txt file due to certain restrictions. Here are a few steps you can take to resolve this issue:

    1. Add a Filter to Allow Editing: You can add the following code to your site to allow Rank Math to edit the robots.txt file:

      /**
      * Allow editing the robots.txt & htaccess data.
      *
      * @param bool Can edit the robots & htacess data.
      */
      add_filter( 'rank_math/can_edit_file', '__return_true' );

      This will enable Rank Math to make changes even if there are restrictions in place.

    2. Check wp-config.php File: Ensure that your wp-config.php file does not contain the following line, which would prevent file edits:

      define ('DISALLOW_FILE_EDIT', true);

      If it does, change it to:

      define ('DISALLOW_FILE_EDIT', false);

      If this line does not exist, you can add it as shown above.

    3. Physical robots.txt File: Make sure there is no physical robots.txt file in the root folder of your website. If there is, you may need to remove it via FTP or cPanel File Manager, as Rank Math creates a virtual robots.txt file that should be managed through the WordPress dashboard.

    4. Plugin Conflicts: Check if any other plugins are creating or managing the robots.txt file. If so, you may need to disable those plugins to allow Rank Math to take control.

    5. Server Permissions: Since you mentioned that the file permissions are set to 644, this should generally be fine. However, if issues persist, you might want to contact your hosting provider to ensure there are no server-level restrictions preventing Rank Math from writing to the file.

    If you’ve tried all these steps and still face issues, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further.

    Thank you for your patience, and we hope this helps resolve your issue!

    Sources:
    Common robots.txt Issues & How to Fix Them » Rank Math
    I Can’t Edit My Website’s Robots.txt » Rank Math

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

The ticket ‘Assistance Needed for “robots.txt File Is Not Writable” Issue on My Website’ is closed to new replies.