Hello,
We apologize for the issue you are facing with accessing your robots.txt file through the Rank Math plugin. There are a few common reasons why you might be unable to edit your robots.txt file:
-
Presence of a Physical File: If there is a physical robots.txt file in the root folder of your website, it can prevent Rank Math from editing it. You can check this by accessing your site via FTP or cPanel File Manager and removing the physical file if it exists.

-
Other Plugin Interference: Another plugin may be creating the robots.txt file, which would also restrict Rank Math’s ability to edit it. You can try disabling any other SEO plugins that might be managing the robots.txt file.
-
Permission Issues: There could be permission issues on your web server that are preventing edits. In this case, contacting your web host for assistance would be advisable.
-
Editing Restrictions in wp-config.php: If your wp-config.php file has certain constants set, it may prevent editing. You can add the following filter to allow editing:
add_filter( 'rank_math/can_edit_file', '__return_true' );
Additionally, ensure that the DISALLOW_FILE_EDIT constant is set to false:
define ('DISALLOW_FILE_EDIT', false);
If you continue to experience issues, please reply to this ticket with your site URL so we can assist you further. Thank you for raising this concern, and we’re here to help!
Sources:
I Can’t Edit My Website’s Robots.txt » Rank Math
Hello,
Thank you for contacting us. We apologize for any inconvenience this issue may have caused.
Please check if there is a physical robots.txt file in your site’s root folder. We recommend removing it via FTP or cPanel File Manager. If you’re unsure how to do this, feel free to contact your website hosting company for assistance.
Once done, Rank Math should generate a dynamic robots.txt file for you.
You can find more information here: https://rankmath.com/kb/cant-edit-robots-txt/
Let us know how this goes. Also, let us know if you have further questions or concerns.
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.