Custom robots.txt file

#898426
  • Resolved Made Online
    Rank Math free

    Rank Math plugin is generating robots.txt file as expected. But I need to replace it with the custom robots.txt file. Is it ok just to upload this file into a root folder or I need to disable it first somewhere in the plugin settings? I don’t want to create some conflicts.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    We apologize for the issue you are facing. To replace the Rank Math generated robots.txt file with your custom one, you will need to remove the virtual robots.txt file that Rank Math creates. Here’s how you can do it:

    1. Remove the Virtual File: You need to delete the existing virtual robots.txt file created by Rank Math. This is done by ensuring that there is no physical robots.txt file in your website’s root folder. If a physical file exists, Rank Math will not allow you to edit it.

    2. Upload Your Custom File: Once you have removed the virtual file, you can upload your custom robots.txt file directly into the root folder of your website using FTP or cPanel File Manager.

    3. Check for Conflicts: After uploading your custom file, ensure that no other plugins are trying to create or manage the robots.txt file, as this could lead to conflicts.

    If you follow these steps, you should be able to use your custom robots.txt file without any issues. If you have any further questions or need assistance, feel free to reply to this ticket, and a human agent from the Rank Math Support team will assist you further.

    Sources:
    I Can’t Edit My Website’s Robots.txt » Rank Math
    How to Edit Your Robots.txt With Rank Math SEO » Rank Math

    I have tried this on my staging website, and it is showing a message “Contents are locked because a robots.txt file is present in the root folder.” and that’s ok but when I check the file in the url https://mydomain.com/robots.txt the content doesn’t match with the files content.

    Hello,

    Thank you for contacting Rank Math support.

    Once you upload the robots.txt file in the root folder, you can’t edit it using our plugin. The physical file should be shown on the robots.txt path. Please clear your site & server’s cache and the physical file should be visible at https://yoursite.com/robots.txt

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

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

The ticket ‘Custom robots.txt file’ is closed to new replies.