{"id":769775,"date":"2021-02-18T08:01:46","date_gmt":"2021-02-18T08:01:46","guid":{"rendered":"https:\/\/rankmath.com\/?post_type=ht_kb&#038;p=769775"},"modified":"2025-07-14T08:07:31","modified_gmt":"2025-07-14T08:07:31","slug":"api-http-400-error","status":"publish","type":"ht_kb","link":"https:\/\/rankmath.com\/it\/kb\/api-http-400-error\/","title":{"rendered":"Why Am I Getting &#8220;API Error: HTTP 400&#8221; Error"},"content":{"rendered":"<p>While running Rank Math&#8217;s SEO analyzer on your website, if you&#8217;re seeing an <strong>API Error: HTTP 400<\/strong>, as shown below, then it simply means that the server is unable to process your API request for some reason.<\/p>\n\n\n\n<p>In this knowledgebase article, we&#8217;ll discuss more about &#8220;<strong>API Error: HTTP 400<\/strong>&#8220;, why you&#8217;re seeing this error, and how you can fix it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"2406\" height=\"868\" src=\"https:\/\/rankmath.com\/wp-content\/uploads\/2023\/01\/seo-anlayzer-localhost-error.jpg\" alt=\"API Error: HTTP 400 error\" class=\"wp-image-1122578\" style=\"width:900px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"http-400-error\">HTTP 400 Error<\/h2>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>Per esempio: <em>malformed request syntax, invalid request message framing, or deceptive request routing<\/em>.<\/p>\n\n\n\n<p>This is more in general, but if you&#8217;re seeing this in Rank Math, then it could be one of the below-listed reasons, and let&#8217;s look at how to fix them as well.<\/p>\n\n\n\n<div id=\"toc\">\n<ul>\n<li><a href=\"#website-under-maintenance\">Website Under Maintenance<\/a><\/li>\n<li><a href=\"#website-status\">Check Website Status<\/a><\/li>\n<li><a href=\"#api-timeout\">API Timeout<\/a><\/li>\n<li><a href=\"#blocked-by-firewall\">API Requests Blocked by Firewall<\/a><\/li>\n<li><a href=\"#locally-hosted-website\">Locally Hosted Website<\/a><\/li>\n<\/ul>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"website-under-maintenance\"><span class=\"number\">1<\/span>  Website Under Maintenance<\/h3>\n\n\n\n<p>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 <a href=\"https:\/\/rankmath.com\/kb\/briefly-unavailable-for-scheduled-maintenance\/\">switch your website back to normal mode<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1039\" height=\"367\" src=\"https:\/\/rankmath.com\/wp-content\/uploads\/2021\/08\/Maintenance-mode.jpg\" alt=\"Maintenance mode\" class=\"wp-image-941977\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"website-status\"><span class=\"number\">2<\/span>  Check Website Status<\/h3>\n\n\n\n<p>If your website isn&#8217;t throwing a 200 status code, then you can check the <a href=\"https:\/\/httpstatus.io\/\" target=\"_blank\" rel=\"noopener\">status of your website here<\/a>. Enter the URL of your website and then click <strong>Check Status<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1280\" height=\"771\" src=\"https:\/\/rankmath.com\/wp-content\/uploads\/2021\/08\/Check-website-status-with-httpstatus-tool.jpg\" alt=\"Check website status with httpstatus tool\" class=\"wp-image-941889\" \/><\/figure>\n\n\n\n<p>If your website returns an error when it is crawled, it will be shown here, and you can fix it accordingly.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1280\" height=\"441\" src=\"https:\/\/rankmath.com\/wp-content\/uploads\/2021\/08\/Error-message-shown-in-httpstatus.jpg\" alt=\"Error message thrown in httpstatus\" class=\"wp-image-941893\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"api-timeout\"><span class=\"number\">3<\/span>  API Timeout<\/h3>\n\n\n\n<p>If your website takes more than 30 seconds to load, then you will see this error as a result of a timeout.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"blocked-by-firewall\"><span class=\"number\">4<\/span>  API Requests Blocked by Firewall<\/h3>\n\n\n\n<p>The server security or firewall is blocking our API requests, and hence you&#8217;re seeing this error.<\/p>\n\n\n\n<p>If this is the case, then you need to whitelist the below IP addresses and the user-agent\u00a0<code>RankMathApi\/2.0.7; https:\/\/rankmath.com<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>46.30.212.200\n46.30.212.201\n46.30.212.202\n46.30.212.203<\/code><\/pre>\n\n\n\n<p>You can do this in the firewall or ask your web hosting provider to help you further.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"locally-hosted-website\"><span class=\"number\">5<\/span>  Locally Hosted Website<\/h3>\n\n\n\n<p>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.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"2406\" height=\"868\" src=\"https:\/\/rankmath.com\/wp-content\/uploads\/2023\/01\/seo-anlayzer-localhost-error-1.jpg\" alt=\"API Error: The Site-Wide Analysis is unavailable on localhost.\" class=\"wp-image-1122580\" style=\"width:900px\" \/><\/figure>\n\n\n\n<p>And, that&#8217;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 <a href=\"https:\/\/rankmath.com\/support\/\">reach our support team directly from here<\/a>, and we&#8217;d be happy to help you at any given time.<\/p>","protected":false},"excerpt":{"rendered":"<p>While running Rank Math&#8217;s SEO analyzer on your website, if you&#8217;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&#8217;ll discuss more about &#8220;API Error: HTTP 400&#8220;, why you&#8217;re seeing this error, and [&hellip;]<\/p>","protected":false},"author":452844,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[162],"ht-kb-tag":[],"class_list":{"0":"post-769775","1":"ht_kb","2":"type-ht_kb","3":"status-publish","4":"format-standard","6":"ht_kb_category-troubleshooting"},"_links":{"self":[{"href":"https:\/\/rankmath.com\/it\/wp-json\/wp\/v2\/ht-kb\/769775","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rankmath.com\/it\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/rankmath.com\/it\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/rankmath.com\/it\/wp-json\/wp\/v2\/users\/452844"}],"replies":[{"embeddable":true,"href":"https:\/\/rankmath.com\/it\/wp-json\/wp\/v2\/comments?post=769775"}],"version-history":[{"count":5,"href":"https:\/\/rankmath.com\/it\/wp-json\/wp\/v2\/ht-kb\/769775\/revisions"}],"predecessor-version":[{"id":1563452,"href":"https:\/\/rankmath.com\/it\/wp-json\/wp\/v2\/ht-kb\/769775\/revisions\/1563452"}],"wp:attachment":[{"href":"https:\/\/rankmath.com\/it\/wp-json\/wp\/v2\/media?parent=769775"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/rankmath.com\/it\/wp-json\/wp\/v2\/ht-kb-category?post=769775"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/rankmath.com\/it\/wp-json\/wp\/v2\/ht-kb-tag?post=769775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}