• Resolved l1z0b

    (@l1z0b)


    I did the “Reset indexables tables & migration” for an issue in my website, the issue was resolved but when I start SEO data optimization I get an error with these details:

    Request method
    POST

    Status code
    404

    Error message
    No route was found matching the URL and request method.`

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Suwash

    (@suascat_wp)

    @l1z0b

    Looking at the error code and message it seems there are some issues with the REST API settings on your server.

    The Yoast plugin uses the WordPress REST API for several features, including SEO data optimization. Therefore, the pathway wp-json/yoast/v1/indexing/prepare/ is a request that our plugin makes to the REST API for scanning posts and index them in the website database. It looks like something on your site/server setups blocks them. Therefore, SEO data optimization cannot be performed.

    Because we don’t know your server setup, we cannot determine exactly why the server returns a 404 for the REST API requests made by Yoast. Based on similar issues we receive from other users, this typically occurs due to a security or server setting.

    Would you please check the mod_security settings that prevent our plugin from accessing the REST API? If there are no mod_security settings preventing access at the server, you may have a custom .htaccess rule or security plugin limiting access to the WordPress REST API. Please review any security restrictions and whitelist the Yoast plugin for accessing the feature.

    If you have a Web Application Firewall (WAF), like Comodo, please verify that it is not set up to strip the parameter from the Yoast REST API requests. Some users have reported that some WAF setups are too strict to prevent Blind SQL injection attacks. Your hosting provider can easily check and help you to resolve this.

    Finally, even if the optimization process makes our plugin work more efficiently, we want to assure you that not performing the optimization process will negatively affect your site’s search results. Additionally, the optimization process will run silently in the background as content on your site is created, modified, or removed.

    We hope it helps and please let us know if some other question comes up, and we can be of further assistance.

    Plugin Support Michael Ti?a

    (@mikes41720)

    Hello,

    This thread has been marked as resolved due to a lack of activity.

    You’re always welcome to re-open this topic. Please read this post before opening a new request.

    Thanks for understanding!

    I’ve got this message when I try to cross-reference my quite large site:

    Oops, something has gone wrong and we couldn't complete the optimisation of your SEO data. Please click the button again to restart the process. If the problem persists, please contact support.
    
    Below are the technical details for the error. See this page for a more detailed explanation.
    
    Error details
    Request URL
    https://www.mysite.com/wp-json/yoast/v1/indexing/prepare
    
    Request method
    POST
    
    Status code
    404
    
    Error message
    No route was found matching the URL and request method.

    The set up is v5.9.2 under nginx 1.18.0, yoast premium 18.2.1, wordfence 7.5.9, ithemes security nginx config patch – the current version (the old one also fails).

    The error 404 should only occur (apart from a genuine missing page) when looking for readme.html or license.txt. All other issues give different return codes.

    I have the permalinks set to /slug and both server and caching caching are switched off.

    It’s a new site but has a lot of imported posts which need cross-referencing so Yoast should be the tool. Jetpack also won’t configure either so it seems to be a REST API issue.

    Problem solved. I checked another site on the same server (also of course running nginx and including the same fcgi file) and the Yoast indexing procedure worked.

    The difference turned out to be a line:

    rewrite “^/([^.]*[^/])$” /$1/ permanent;

    which had been there for ages and was never a problem before. It clearly rewrites the URL by appending an automatic “/”. I commented it out and now Yoast works fine.

    Jetpack still finds an error but I don’t need that – I have Akismet as a plugin anyway.

    Eventually I will remove as many plugins as possible but at least I can now get on with other stuff.:)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘SEO optimization error 404’ is closed to new replies.