In short. Enable Advanced Mode, open Rank Math SEO > General Settings > Edit robots.txt, edit the rules and save; a physical root file takes precedence.
Definition: As of 17 October 2026, Rank Math provides a virtual robots.txt editor under Rank Math SEO > General Settings > Edit robots.txt in WordPress. A physical robots.txt file in the website's root folder takes precedence over changes made in this editor.
Key facts
- Rank Math's General Settings documentation describes the editor as controlling a virtual robots.txt file.
- The editing guide requires Advanced Mode and identifies Save Changes as the button that saves modifications.
- Rank Math's troubleshooting guide identifies a physical root file and another plugin creating robots.txt as reasons editing can be unavailable.
- Google's robots.txt introduction explains that a disallowed page can still be indexed when other sites link to it.
Where is the editor, and how are changes saved?
According to Rank Math's editing guide, the procedure starts in the WordPress dashboard:
- Open Rank Math SEO and enable Advanced Mode in the top-right corner.
- Open General Settings, then select Edit robots.txt.
- Add or edit the rules in the available text area.
- Click Save Changes to save the modifications.
The guide supplies the following default rules, including a sitemap location. The example domain yoursite.com must be replaced with the website's domain before use.
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
Sitemap: https://yoursite.com/sitemap_index.xml
What happens when a physical robots.txt file exists?
A physical file is an actual robots.txt file stored in the website's root folder. Rank Math's General Settings documentation states that changes in its virtual editor have no effect while that file exists. Saving new text in WordPress therefore leaves the physical file's rules in control.
The documentation gives two alternatives: edit the physical file directly through a server file-management method, or remove it and manage the virtual version through Rank Math.
The troubleshooting guide also names cPanel File Manager as a way to remove the physical file. It separately identifies another plugin generating robots.txt as a possible conflict and recommends disabling that plugin to let Rank Math handle the file.
How is the published file checked?
Rank Math's editing guide explains that adding /robots.txt to the domain in a browser displays the physical or virtual file's contents. Its example address is:
https://yourdomain.com/robots.txt
After saving, opening the equivalent address on the website allows the served rules to be compared with the intended changes. Rank Math's General Settings documentation also identifies the Robots.txt Tester link beneath the free editor, which opens its external testing tool to verify changes.
Related terms
- robots.txt
- robots.txt Disallow directive
- Where does a robots.txt file need to be hosted?
- How do I set noindex on a page in Rank Math?
FAQ
Why can I not find Edit robots.txt?
Check that you have enabled Advanced Mode. Rank Math's editing guide places that step before opening General Settings and selecting the editor.
Can I keep the physical file and use Rank Math's editor?
You can retain the physical file, but Rank Math's General Settings documentation says the virtual editor's changes have no effect while it exists. Edit the physical file directly if you keep it.
Does a Disallow rule remove my page from Google Search?
Google's robots.txt introduction says a disallowed URL can still appear when other sites link to it. If you need indexing exclusion, Google points to noindex or password protection.
Sources
- Rank Math, "Rank Math General Settings", undated
- Rank Math, "Using Rank Math's Robots.txt Generator", updated 22 July 2025
- Rank Math, "I Can't Edit My Website's Robots.txt", updated 30 June 2023
- Google Search Central, "Introduction to robots.txt", updated 10 December 2025
Check how a page reads to answer engines. Open the GEO score analyzer