Hello @yliadr,
Thank you for contacting support.
Since the 404 is coming directly from the server it means the request never reaches the WordPress installation.
For the robots.txt file please make sure that you follow the steps here and include the redirections on your server configuration file: https://rankmath.com/kb/fix-common-robots-txt-issues/#robots-txt-returns-blank-page-or-404-error
As for the sitemap, it’s a similar situation and you need to add the redirections on the server file that are referenced on this tutorial: https://rankmath.com/kb/sitemap-404-error/#nginx-apache-server
Don’t hesitate to get in touch if you have any other questions.
Thread Starter
yliadr
(@yliadr)
https://www.pkmt74.ru/wp-content/uploads/2024/07/test.jpg
@rankmathsupport thankth, but we can’t make this mistake. And how did it work earlier then? Could this problem be caused by cron settings? And then why does everything work on the same hosting (in the next folder) with the same settings? https://dev.pkmt74.ru/sitemap_index.xml
-
This reply was modified 2 years, 3 months ago by
yliadr.
Thread Starter
yliadr
(@yliadr)
@rankmathsupport
Changes have been made to Apache, there is no result
Hello @yliadr,
The mistake is not on your end. Your server returns a 404 error for the sitemap URL, which means that they are looking for a physical file to be present in the root directory instead of forwarding the request to WordPress. Your site is using Nginx server. You will have to add the rules in the server configuration file to make the sitemap work: https://rankmath.com/kb/sitemap-404-error/#num-3-2-1-add-rewrite-rules-to-nginx-server
Let us know how that goes. Looking forward to your update.
Thread Starter
yliadr
(@yliadr)
@rankmathsupport response from technical support
We use nginx as a proxying web server that returns only static data generated by the proxied apache server. The rules that they propose to add to the nginx configuration file will not work as they need, and we will not make them, because this is a virtual hosting where such actions are impossible.
Hello @yliadr,
In that case, you should confirm with your host why the Apache rules added to the .htaccess file are not working for the sitemap. If the request was being forwarded to WordPress or if the issue was with the plugin, the 404 error would have been returned by WordPress, not from the server side.
Let us know how that goes. Looking forward to your update.
Thread Starter
yliadr
(@yliadr)
@rankmathsupport
When referring to https://pkmt74.ru/index.php?sitemap=1 , to which the request should be forwarded in the form https://pkmt74.ru/sitemap_index.xml the site does not return anything at all – the page is empty. In this case, no redirects work: index.php receives an input parameter that does not respond in any way.
Hello @yliadr,
The page doesn’t show anything because the styling of the sitemap is not loaded but if you check the actual source code of the page you’ll see the XML data present.
So, as mentioned before this is a case of the redirections not being properly implemented for your specific server configuration so we would recommend discussing it further with the hosting provider.
Thank you.