Get AI SEO for FREE.

Learn More!

Why Am I Getting “API Error: HTTP 400” Error

While running Rank Math’s SEO analyzer 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.

API Error: HTTP 400 error

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.

Maintenance 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.

Check website status with httpstatus tool

If your website returns an error when it is crawled, it will be shown here, and you can fix it accordingly.

Error message thrown in httpstatus

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 193.138.6.5 and the user-agent RankMathApi/2.0.2; https://rankmath.com.

You can do this in the firewall or ask your web hosting provider to help you further.

5 Locally Hosted Website

The SEO Analyzer module of Rank Math will run only on a live site that returns a 200 OK status when crawled from an external site. If your site is hosted locally, the SEO Analyzer module will not work and will return you with an API error.

API Error: The Site-Wide Analysis is unavailable on localhost.

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.

Still not using Rank Math?

Setup takes less than 5 minutes including the import from your old SEO Plugin!

Learn more about the PRO Version

Still need help?

?

Submit Your Question

Please give us the details, our support team will get back to you.

Open Ticket

Related Articles