Hello,
Thank you for reaching out with your question about editing the robots.txt file in Rank Math.
In Rank Math, when you edit the robots.txt file, you can type over the existing code without any issues. Typing new rules will replace the existing ones. You do not need to add an additional layer of the same code; simply type the new robots.txt code over the existing one.
If you have any more questions or need further assistance, feel free to ask. We’re here to help!
You can also refer to our knowledge base for more information on editing robots.txt files with Rank Math: How to Edit Your Robots.txt With Rank Math SEO.
Sources:
What Are the Best Robots.txt File Rules for Multisite? » Rank Math
How to Edit Your Robots.txt With Rank Math SEO » Rank Math
Can I NoIndex PDF Files Using an SEO Plugin? » Rank Math
I Can’t Edit My Website’s Robots.txt » Rank Math
Hi there i redid the code to this
User-agent: *
Disallow: /wp-admin/
Disallow: /feed/
Disallow: /tag/
Disallow: /category/
Disallow: /comments/
Disallow: /2023/
Allow: /wp-admin/admin-ajax.php
Sitemap: https://mysingaporedriver.com/sitemap_index.xml
Do i need to remove the wo-admin and ajax or just keep to it
Hello,
The wp-admin
and admin-ajax
paths aren’t meant to be crawled by search engines so you can keep them in the robots.txt.
Don’t hesitate to get in touch with us if you have any other questions.
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.