robots.txt file is not writable.

#1094381
  • Resolved Milko Valnev
    Rank Math free

    I have Elementor hosted site with Elementor pro and RankMath pro. robots.tct not writable.
    How can i fix it. I read the support article online but theme editor is not available in my set up

Viewing 1 replies (of 1 total)
  • Hello,

    I’m sorry to hear that you’re facing issues with your robots.txt file being not writable. This can happen for a few reasons, especially if the file edits are disabled through your site’s configuration. Here are some steps you can take to resolve this issue:

    1. Allow Editing of the robots.txt File

    You can add the following filter 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' );

    You can refer to this guide on adding filters to your site.

    2. Check wp-config.php File

    You may also need to check your wp-config.php file for the following line:

    define ('DISALLOW_FILE_EDIT', true);

    If it exists, change it to:

    define ('DISALLOW_FILE_EDIT', false);

    If it doesn’t exist, you can add it as shown above.

    3. Check for Physical robots.txt File

    Ensure that there is no physical robots.txt file in the root folder of your website. If there is one, you will need to remove it via FTP or cPanel File Manager.

    4. Permissions Issue

    If you still cannot edit the file, there might be permission issues on your web server. In this case, contacting your web host for assistance would be advisable.

    5. Other Plugins

    Sometimes, other plugins may interfere with the editing capabilities. Ensure that no other plugin is creating or managing the robots.txt file.

    If you continue to experience difficulties, please reply to this ticket with your site URL, and a human agent from our support team will assist you further. Thank you for raising this concern!

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

    This is an automated reply from Rank Math Support Bot. If you need further assistance, please reply to this topic and a human support agent will reply to you shortly.

    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 ‘robots.txt file is not writable.’ is closed to new replies.