My WordPress REST API is returning 403 Forbidden for authenticated REST API requests. The endpoint works as a normal WordPress REST API endpoint, but requests using context=edit are blocked.
This affects WordPress Site Health and prevents my MCP plugin from connecting to the site. Elementor and Breakdance are installed, but the main issue appears to be server-side REST API blocking.
Please check whether InfinityFree firewall, ModSecurity, or another security rule is blocking authenticated REST API requests for my account.
The website uses HTTPS and SSL is active. Please let me know if this endpoint can be allowed.
Welcome to the InfinityFree community forum! Good to have you here.
Most people answering here are volunteers. They’re often the fastest source of help. Admin (the only staff member) checks in about once a day for issues on our end.
Volunteers can’t see your account or website. Share what you actually see, like error messages and what happens when you try something. That’s more useful than your theory of what’s wrong.
AI tools often get InfinityFree wrong. If a volunteer’s advice differs from what an AI told you, please try the volunteer’s suggestion first.
Solving an issue is a joint effort. Try the suggestions you get and report back what happened.
Beep boop, I’m a bot! I dug through the forum to get you started. I sometimes get things wrong though, so do with this what you will until a human has a look.
This is InfinityFree’s browser security system, not a ModSecurity or firewall rule on your account. It can’t be turned off or allowed per endpoint on free hosting.
The system requires JavaScript and cookies, which plugins, scripts and WordPress’s own self-checks can’t provide. Programmatic requests to your site, including REST API endpoints, usually get a “403 Forbidden” back. This article covers it:
For the Site Health message, “The REST API encountered an unexpected result” is a known warning on InfinityFree. It appears because WordPress can’t call its own site through the security system. It doesn’t mean the API is broken for real visitors. This article lists it:
So the Site Health warning can be ignored. But your MCP plugin connects from outside as an automated client, so it will most likely be blocked the same way. I don’t think it can work on free hosting. The article’s options are premium hosting, which doesn’t have this restriction, or a different setup that doesn’t need inbound API calls. I haven’t verified how your specific plugin connects, so that part is an inference from the article.
More detail on how the security system works is here:
Thank you for the detailed explanation. This clarifies that the 403 response is caused by InfinityFree’s browser security system, which requires JavaScript and cookies and blocks automated REST API requests.
I was trying to connect a WordPress MCP plugin to my website so an external AI coding agent could communicate with WordPress through the REST API. I understand that the Site Health warning can be ignored, but the MCP connection will most likely not work on InfinityFree free hosting.
Thank you for explaining the available alternatives.
Thank you for confirming this. I understand that the limitation is caused by InfinityFree’s security system on free hosting and cannot be disabled or bypassed for this use case.
My goal was to connect an external WordPress MCP client to my site through the REST API. I will look into premium hosting or another hosting provider that permits automated API requests.
Thank you for the clear explanation. I understand that the browser security system is important for protecting free hosting accounts from abuse.
Since MCP and other automated APIs are becoming increasingly common in modern website development, I would like to suggest an optional solution for free users. For example, InfinityFree could provide an opt-in API access feature with secure API keys, rate limits, endpoint restrictions, and abuse monitoring.
This would allow legitimate users to connect trusted tools such as WordPress MCP while keeping the existing browser protection enabled for normal traffic. Users could enable it only when needed and accept responsibility for securing their API credentials.
MCP support would be especially valuable for WordPress developers, and providing a controlled API option could make InfinityFree more useful for modern development and encourage users to appreciate and recommend the platform.
I understand that implementing this may require security review and may not be possible immediately. I am sharing it as a constructive feature request for future consideration.
All API access is blocked on our hosting, no exceptions. An the Model Context Protocol is ultimately just a special type of API.
Security is not optional on our hosting. We determine how websites on our hosting are protected, and provide a safe baseline with next to no options to customize it. Security benefits not just your website, but our service too. And people of very different skill levels use our service, and we don’t want to hand inexperienced web developers a footgun.
Our security system is very simple, it’s easy to maintain, cheap to run, and does what it needs to do. There are no complex rules or sophisticated bookkeeping and analysis.
I know you’re not happy with this. Neither are the many people who wanted other kinds of APIs on our hosting, including those where the lack of it meant that their project could not run on our hosting at all. And now you’re grasping at straws trying to get us to change something that will work for you.
That doesn’t automatically justify building and maintaining a wildly complex solution to somehow secure API traffic to a nearly infinite number of website types and API formats that people would use or build themselves (remember, not everyone uses WordPress), protecting against both attackers from outside our hosting and those inside of it (remember, we don’t need to protect our users from abuse by the outside world, but also protect the outside world from abuse by our users).
So the answer is still no. No need to waste more AI tokens to argue your point.