While running Rank Math’s SEO analysis on your website, if you’re seeing an API Error: HTTP 400, as shown below, then it simply means that the server is unable to process your API request for some reason.
In this knowledgebase article, we’ll discuss more about “API Error: HTTP 400“, why you’re seeing this error, and how you can fix it.
HTTP 400 Error
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status implies that the server cannot or will not process the request due to something that is perceived to be a client error.
For example: malformed request syntax, invalid request message framing, or deceptive request routing.
This is more in general, but if you’re seeing this in Rank Math, then it could be one of the below-listed reasons, and let’s look at how to fix them as well.
1 Website Under Maintenance
When your website is under maintenance, your website cannot be accessed. And in this case, you will see this error. So try again once you switch your website back to normal mode.
2 Check Website Status
If your website isn’t throwing a 200 status code, then you can check the status of your website here. Enter the URL of your website and then click Check Status.
If your website returns an error when it is crawled, it will be shown here and you can fix it accordingly.
3 API Timeout
If your website takes more than 30 seconds to load, then you will see this error as a result of a timeout.
4 API Requests Blocked by Firewall
The server security or firewall is blocking our API requests and hence you’re seeing this error.
If this is the case, then you need to whitelist the IP
126.96.36.199 and the user-agent
You can do this in the firewall or ask your web hosting provider to help you further.
5 Locally Hosted Website
The SEO Analysis module of Rank Math will run only on a live site that returns 200 OK status when crawled from an external site. If your site is hosted locally, the SEO Analysis module would not work and return you with an API error.
And, that’s it! We hope the article was helpful in understanding what causes this API error. If you are still facing problems or have any queries, please feel free to reach our support team directly from here, and we’d be happy to help you at any given time.