Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.
If you don’t have
define( ‘DISALLOW_FILE_EDIT’, true );in your wp-config.php file, please add this one
define ('DISALLOW_FILE_EDIT', false);
If the issue persists, please check your root directory. There shouldn’t be any robots.txt file as Rank Math will create a virtual robots.txt on your website. If you see any, please rename/delete that. The .htaccess file should be also 644 to be rewritable.
I hope that helps. Thank you, and looking forward to your update.
I have updated the sensitive data as requested. Can you please check further?
Can you please check if your
robots.txtfile permission is writable? It should be 644 on your web hosting’s file manager or when you view it on FTP.
If the issue persists, kindly contact your web hosting provider to check if they have permission issues with their server.
I hope this helps resolve your issue.
I did everything such as:
1- rename/delete the robots.txt file from web hosting’s file manager
2- I Make sure the permission for both files robots.txt and htaccess are 0644
3- I asked the web hosting provider to check if they have permission issues with their server… and they check it and told me everything is ok.
So I have these problems:
1- Both robots.txt file and htaccess are not writeable in Rank math plugin and can not make any editing on robots.txt file
2- If I change the robots.txt file in the web hosting file manager, and make the same in the google search console, it will not be updated in the google search console
Please could you please help me with these problems?
Thank you for keeping in touch with us.
Probably you are using some security plugin that makes those files not writable.
.htaccessfiles are two really important files on a website and having changes on them can cause damages to your sites if not done properly.
So usually security plugins (and even some hosts) make those files not writable from WordPress so a hacker or even a plugin can’t change them and cause issues.
Can you please confirm if you are using such a plugin?
We are looking forward to helping you.
Would you please try the deactivating the plugins you mentioned temporary then clear your cache and check if the robots.txt and htaccess files are now writable.
If this doesn’t help, 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.
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:
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):
We really look forward to helping you.
I just had the same issue as above with the un-writable .htaccess file with the iThemes security plug-in. I disabled the plugin and can now edit the .htaccess file. Thanks!
@Troy Thank you for your input, and hopefully, this would help to fix the issue with robots.txt and .htaccess.
@Mohammed Please let us know how this goes with iThemes security plugin.
If you have any concerns, please don’t hesitate to contact us anytime to assist you further.
Thank you, and looking forward to helping you.
Many thanks for your help.
I disabled the iThemes security plug-in and can now edit the .htaccess file and robots.txt.
We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.
If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.
If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
You must be logged in to reply to this ticket.