Hello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
The issues you’re facing on Google Search Console are not related to your robots.txt or your sitemap. You can try to URLs below to resolve those issues:
1. Excluded by NoIndex Tag:
https://rankmath.com/kb/excluded-by-noindex-tag/
2. Alternate Page with Proper Canonical Tag:
https://rankmath.com/kb/alternate-page-with-proper-canonical-tag/
3. Not found (404):
https://rankmath.com/kb/find-the-souce-of-404-errors/
4. Page With Redirect:
https://rankmath.com/kb/page-with-redirect/
5. Duplicate Without User-Selected Canonical:
https://rankmath.com/kb/duplicate-without-user-selected-canonical/
Regarding the robots.txt, I can see the robots.txt file is being generated by Rank Math properly at /robots=1
. Please check if there is a robots.txt file in the root directory of your website. If there is a file, delete it and clear your website cache including any server-level cache, and check again.
But if there’s no physical robots.txt file present in your server’s root directory, then this might be happening because the redirection isn’t taking the place. In order to fix this issue, you can try adding some rules to your site, similar to the following rewrite rule, and check if the robots.txt is working properly:
# For Nginx server:
# START Nginx Rewrites for Rank Math Robots.txt File
rewrite ^/robots.txt$ /?robots=1 last;
rewrite ^/([^/]+?)-robots([0-9]+)?.txt$ /?robots=$1&robots_n=$2 last;
# END Nginx Rewrites for Rank Math Robots.txt File
Here’s an article you can check as well: https://ubiq.co/tech-blog/rewrite-url-parameters-nginx/
# For Apache server:
# START of Rank Math Robots.txt Rewrite Rules
RewriteEngine On
RewriteBase /
RewriteRule ^robots.txt$ /index.php?robots=1 [L]
# END of Rank Math Robots.txt Rewrite Rules
Here’s how you can edit .htaccess
file using Rank Math:
https://rankmath.com/kb/edit-htaccess/
Please do take a backup before editing your .htaccess
file.
You can also ask your web host to do that for you.
Let us know how it goes. Looking forward to helping you.
Thank you.