401 response code for wp-json/ when I do a site audit

#87646
  • Resolved Vivek Mathew
    Rank Math pro

    Hi All, I got 401 response code for my site when I ran a site audit. The urls look like the below and there are several instances of them:
    domain.com/wp-json/wp/v2/posts/
    domain.com/wp-json/oembed/1.0/embed?url=https://domain.com/blog/postname/
    domain.com/wp-json/oembed/1.0/embed?url=https://domain.com/blog/postname/&format=xml
    Does this have something to do with file permissions? Any idea how to resolve this? I highly appreciate any help.

    I added some additional conditions due to some google crawl errors. I’m wondering if it’s because of this. Robots.txt below:
    User-agent: *
    Allow: /wp-content/uploads/
    Allow: /wp-admin/admin-ajax.php
    Disallow: /wp-content/plugins/
    Disallow: /wp-admin/
    Disallow: /readme.html
    Disallow: /refer/
    Disallow: /wp-includes/
    Sitemap: https://domain.com/sitemap_index.xml

Viewing 5 replies - 1 through 5 (of 5 total)
  • Alberto
    Rank Math business

    Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    Are you using any security plugin? We have seen it happening sometimes on sites with those plugins. Also, it could be due to some security measures in the hosting so you should also ask your hosting support.

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Thank you so much for the prompt response. You were right; the issue was caused by a security plugin (WP hardening). It’s all good now.
    Thanks!

    • This reply was modified 4 years, 1 month ago by Vivek Mathew.
    Alberto
    Rank Math business

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

    Happy to spread the word. I’ve left a 5-star review. Thanks for the amazing support.

    That’s superb

    We appreciate your feedback

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

The ticket ‘401 response code for wp-json/ when I do a site audit’ is closed to new replies.