Issue was in – robots.txt file is not writable.

#674790
  • Resolved Anonymous
    Rank Math free

    in last 2 days my site is not crawling and its showing below mentioned error in the rank math

    1. robots.txt file is not writable.

    2..htaccess file is not writable.

    domain name; thechennaituition.com

    pls check and suggest to rectify the issue

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello, I’m sorry to hear that you’re experiencing issues with your site’s crawling. The error message “robots.txt file is not writable” indicates that Rank Math is unable to modify your robots.txt file. To resolve this, you can add a filter to your site that will allow Rank Math to edit the robots.txt file. Here’s the code you need to add:

    /**
     * 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 also navigate to your wp-config.php file and search for the following code:

    define ('DISALLOW_FILE_EDIT', true);

    If the code exists, you should replace it with the below code. If it does not exist, add the below code to the wp-config.php file.

    define ('DISALLOW_FILE_EDIT', false);

    If you’re unable to access your wp-config.php file, I recommend reaching out to your web host for further assistance. Once these changes are made, you should be able to edit your robots.txt file through Rank Math.

    If you have any questions or need further assistance, please feel free to ask.

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

    Anonymous
    Rank Math free

    1. robots.txt file is not writable.

    Anonymous
    Rank Math free

    I am having a lot of trouble with this.please help me. Issue was in – robots.txt file is not writable.

    Hello,

    You may notice a robots.txt file is not writeable error message when Rank Math is unable to make any edits to the robots.txt file of your website.

    This is possible when the file edits are disabled through the wp-config.php file.

    Please follow our guide here to fix this on your site:
    https://rankmath.com/kb/cant-edit-robots-txt/#not-writeable

    Looking forward to helping 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 4 replies - 1 through 4 (of 4 total)

The ticket ‘Issue was in – robots.txt file is not writable.’ is closed to new replies.