Rest API is working but still tagged as disabled
-
Hello,
I have a new error message recently: the classical message “AIOSEO relies on the WordPress Rest API and your site might have it disabled”.
- I don ‘t use Cloudflare and no other caching plugin.
- the request “mysite.com/wp-json” is returning data so the API is working
- WP Health page shows no error
- I upgraded to the latest AIOSEO plugin version
How AIOSEO decides to say that the REST API is disabled? Do you have the query for it, so that I can see manually what might be blocking? As said, this worked fine for years, and I didn’t do anything special on all my sites. So where is this error coming from?
Thanks,
Didier.
-
Hi?@swissspaceboy,
The WordPress REST API error will not allow you to save certain settings or access other features within AIOSEO.
You can use the Health Check & Troubleshooting plugin (https://www.ads-software.com/plugins/health-check/) to debug possible conflicts by following these steps:
This test will not affect the site for your visitors.
- Make sure to have a default WordPress theme like Twenty Twenty – Two installed
- Go to?Plugins > Add New?and install and activate the?Health Check & Troubleshooting plugin.
- Go to Plugins > Installed Plugins and click on Troubleshoot below the All in One SEO plugin.
- This will temporarily disable all the plugins and switch to a default theme only for your user ID without impacting what your visitors see.
- Check to see if you’re able to reproduce the problem.
- If the there’s no message, activate your theme and other plugins one at a time under Troubleshooting Mode at the top to check for the issue.
- Once you’re done troubleshooting, deactivate and delete the Health Check & Troubleshooting plugin.
Please let me know what you find.
Thanks!
Hello,
I did some extra analysis:
- Using this API request “mywebsite.com/wp-json/wp/v2/posts”, I get all my published posts, so the API is working fine for me from my browser.
- I installed plugin “REST API Log” to log all REST requests. I see in the log my previous requests of the GET of posts, but I do not see any entries for the AIOSEO plugin. Strange no?
- Only 2 site updates were performed the last months: WordFence plugin and WP version update to 6.2.3. I disabled Wordfence. Not better.
Either it is related to the WP update from 6.2.2 to 6.2.3, or I have a hosting server problem. They changed the server recently. But it doesn’t explain why my REST API is working fine, but AIOSEO is telling me the opposite.
Again, how does the plugin determine that the REST API is disabled, as I see no real-time check done per logs ? How is this checked from code level, please?
Didier.
Hi @swissspaceboy,
If you could share your site URL, I would be happy to see how the server responds to the API test.
There are numerous checks that we perform within PHP.
Thanks!
Hi,
You can use this URL
https://www.talentbox.solutions/
I have some firewalls and security checks in place, so let me know if you have troubles accessing the website.
Thanks for the checks.
Didier.
Hi @swissspaceboy,
Thanks for sharing the URL. I’ve been identified as a bad bot by your security software.
I’m using Insomnia to test.Thanks!
ok, I don’t why Insomnia is considered as a bad bot, but I whitelisted for you. Please check again. I hope it goes through now.
Didier.
Hi @swissspaceboy,
Please allow access for the following URL and then recheck to see if you’re still getting a WordPress Rest API error –
https://www.talentbox.solutions/wp-json/aioseo/*Thanks!
Hi,
I spend a couple of hours checking this thing.
I don’t think that the wildcard * is a valid parameter. When I try it on other plugins/namespaces of my websites, I got also the 404 error. I tried on another website (not mine!) and I also get 404 errors when using this wildcard. Try
https://maheshwaghmare.com/wp-json/akismet/*
https://maheshwaghmare.com/wp-json/akismet/v1 is working fine.
For AIOSEO, when I use the URL below, I get results back from the registered endpoints.
Can you double check if this wildcard /aioseo/* is correct?
https://www.talentbox.solutions/wp-json/aioseo/v1
namespace "aioseo/v1"
routes
/aioseo/v1 {…}
/aioseo/v1/options {…}
/aioseo/v1/ping {…}
/aioseo/v1/post {…}
/aioseo/v1/post/(?P[\d]+)/first-attached-image {…}
/aioseo/v1/user/(?P[\d]+)/image {…}
/aioseo/v1/tags {…}
/aioseo/v1/htaccess {…}
/aioseo/v1/post/(?P[\d]+)/disable-primary-term-education {…}
/aioseo/v1/post/(?P[\d]+)/disable-link-format-education {…}
/aioseo/v1/post/(?P[\d]+)/update-internal-link-count {…}
/aioseo/v1/postscreen {…}
/aioseo/v1/termscreen {…}
/aioseo/v1/keyphrases {…}
/aioseo/v1/analyze {…}
/aioseo/v1/analyze-headline {…}
/aioseo/v1/analyze-headline/delete {…}
/aioseo/v1/analyze/delete-site {…}
/aioseo/v1/clear-log {…}
/aioseo/v1/connect {…}
/aioseo/v1/connect-pro {…}
/aioseo/v1/connect-url {…}
/aioseo/v1/backup {…}
/aioseo/v1/backup/restore {…}
/aioseo/v1/email-debug-info {…}
/aioseo/v1/migration/fix-blank-formats {…}
/aioseo/v1/notification/blog-visibility-reminder {…}
/aioseo/v1/notification/description-format-reminder {…}
/aioseo/v1/notification/conflicting-plugins-reminder {…}
/aioseo/v1/notification/install-addons-reminder {…}
/aioseo/v1/notification/install-aioseo-image-seo-reminder {…}
/aioseo/v1/notification/install-aioseo-local-business-reminder {…}
/aioseo/v1/notification/install-aioseo-news-sitemap-reminder {…}
/aioseo/v1/notification/install-aioseo-video-sitemap-reminder {…}
/aioseo/v1/notification/install-mi-reminder {…}
/aioseo/v1/notification/install-om-reminder {…}
/aioseo/v1/notification/v3-migration-custom-field-reminder {…}
/aioseo/v1/notification/v3-migration-schema-number-reminder {…}
/aioseo/v1/notifications/dismiss {…}
/aioseo/v1/objects {…}
/aioseo/v1/plugins/deactivate {…}
/aioseo/v1/plugins/install {…}
/aioseo/v1/plugins/upgrade {…}
/aioseo/v1/reset-settings {…}
/aioseo/v1/settings/export {…}
/aioseo/v1/settings/hide-setup-wizard {…}
/aioseo/v1/settings/hide-upgrade-bar {…}
/aioseo/v1/settings/import {…}
/aioseo/v1/settings/import/(?P[\d]+) {…}
/aioseo/v1/settings/import-plugins {…}
/aioseo/v1/settings/toggle-card {…}
/aioseo/v1/settings/toggle-radio {…}
/aioseo/v1/settings/dismiss-alert {…}
/aioseo/v1/settings/items-per-page {…}
/aioseo/v1/settings/do-task {…}
/aioseo/v1/sitemap/deactivate-conflicting-plugins {…}
/aioseo/v1/sitemap/delete-static-files {…}
/aioseo/v1/sitemap/validate-html-sitemap-slug {…}
/aioseo/v1/tools/delete-robots-txt {…}
/aioseo/v1/tools/import-robots-txt {…}
/aioseo/v1/wizard {…}
/aioseo/v1/integration/semrush/authenticate {…}
/aioseo/v1/integration/semrush/refresh {…}
/aioseo/v1/integration/semrush/keyphrases {…}
/aioseo/v1/integration/wpcode/snippets {…}
_links {…}Hi @swissspaceboy,
Thanks for the follow-up. If you can’t add a rule with a wildcard, please check this URL – https://www.talentbox.solutions/wp-json/aioseo/v1/ which is throwing a 403 and add an exception to see if that clears the error.
Thanks!
Hello,
Except Wordfence, I have no other security things in place to add a rule. I don’t where this 403 is coming from. It is not Wordfence as I disabled it.
https://www.talentbox.solutions/wp-json/aioseo/v1/ -> 403
https://www.talentbox.solutions/wp-json/aioseo/v1 -> works fine (without the trailing slash).
Any idea what could impact the usage of this trailing slash in the URL?
Didier.
Hi @swissspaceboy,
Could you please reach out to your website host support to see what is causing a 403 error for that directory root? I did get a warning screen from Imunify360 when testing your site URL.
Please let me know what they find.
Thanks!
Thanks. I am checking with my hoster if they can explain these 403 forbidden errors.
I will report back.
Didier.
Hello.
- as I expected, the link with trailing slash https://www.talentbox.solutions/wp-json/aioseo/v1/ is forbidden, as directory browsing is not allowed. For security reasons, it is recommended to disable that.
- I do not know yet who is giving this 403 error for this directory browsing. I disabled all mod rewrites and I still have the error.
- My hoster gets also the 403 error, and this is not a surprise for them. Cf #1.
- My hoster can see for your imunify360 error. What is the error message, please?
Didier.
Hi @swissspaceboy,
This was the error – https://a.supportally.com/i/Ss6833
But initially, the the Imunify360 logo popped up in the browser. Maybe it was checking my IP.
Thanks!
Hello,
Thanks for the error message. That’s the one that we all get.
For Imunify360, you were able to continue or we need to whitelist your IP?
Didier.
- The topic ‘Rest API is working but still tagged as disabled’ is closed to new replies.