Hello Support Team,
I just tried to start the SEO Analysis.
I runs to 100%, then it waits a short time.
Then I get the “API Error: Invalid server response”
I found a similar ticket, but there was no solution it seems.
I would be happy about any help.
- This topic was modified 4 months, 1 week ago by Olaf Laser.
it seems, we are in the next round 😉
The admins of WA did some investigations as they set up a fresh page and it happens to them that the error occers too … But, then they downgraded the version and supprisingly that one was working. So they came to the conclusion, that maybe some of the changes between the versions is causing the issue.
Here you see the message I got back. Maybe it is helpful for you:
We have created the temporary siterubix site “https://mywhiskeynews.siterubix.com” for testing. We checked by deactivating plugins and changing the theme, but we got the same error.
As per the support thread you have created on the Rankmath support forum: https://support.rankmath.com/ticket/api-error-invalid-server-response-2/.
We see that the old version (1.0.38) of a plugin is working fine on the WA server, so we suspect that the latest version of the plugin has some changes, and that is causing the issue. We suggest you can contact the plugin provider and ask them to provide a guideline on this.
Also, the IP 220.127.116.11 provided by them is from Cloudflare as they are using Cloudflare DNS. So you can request them to provide us with hosting server IP to check further.
Please check the attached screenshots.
Thanks for the follow up.
We are checking this further and we will be in touch in a short while.
Your patience is highly appreciated.
I have the same issue.
My site is
I use amazon lightsail instance for wordpress to host my website.
I don’t have any firewall.
Search Console started to work today but SEO analysis displays the same message:
API Error: Invalid server response.
Thanks for your help
I’m almost sure that the issue is what I described in my previous post, because the timeout error is quite straightforward, there is no question about it. The error “Invalid server response” is not an error message defined in the plugin, it is coming from our analysis API server, which means that the issue is happening when our server is trying to download your homepage.
The fact that it is working correctly with the previous version might be explained by the analysis results being cached in your database. Please try it again with the previous version after clearing the analysis results cache in Rank Math > Status & Tools > Database Tools.
The person is correct about the Cloudflare IP though – sorry about that. Here is the correct IP address to look for:
If the hosting support person cannot find a solution for this, please create a staging copy of your site where we can try some changes in the code, and share the WP admin & FTP access details to it.
I too am getting “invalid server response”
However we are still developing this site, whilst been hosted locally.
What was the fix to getting seo analyser to work
I did as you mendioned.
Rollback to 1.0.38, cleared the cache … and it is working.
Now I have setup a fresh new site with only rankmath installed, nothing else.
The current version runs into the same issue.
Then I rolled back to 1.0.38 too, cleared the cache … and its working.
I put the login data into the sensitive data section. So feel free to login and take a closer look on it.
- This reply was modified 4 months ago by Olaf Laser.
Thank you for setting up a site for us to check.
I have logged in to your site and although it looks like it’s working with the previous version, in reality the same issue happens there. What’s changed in the new version is that now we don’t show incomplete Analysis data, to avoid confusion.
When you run the Analysis in the older version, you can see the same “Invalid server response” error showing up above the results, and the results only show a portion of all the tests – the external tests done by our API server are missing, and only the “local” tests are executed (12 of the 34 tests).
This reaffirms my suspicions, that the requests made from our server to yours are being blocked. Please make sure to whitelist the IP
18.104.22.168and the user-agent
Hope that helps.
thanks for analyzing!
That was tricky 😉
I will get back to the admins with this info. I’ll keep you informed!
Do keep us posted. If there is an issue with the plugin, we are more than willing to help fix it.
This is SiteSupport@wealthyaffiliate where we have a few members reporting these issues.
I’d like to try to work with you to get the bottom of this if we could.
On our end these requests from 22.214.171.124 (user-agent RankMathChecker) are not being blocked. We can follows the requests in our logs and see HTTP 200 OK responses sent back.
mywhiskeynews.siterubix.com:80 126.96.36.199 – – [09/Mar/2020:20:13:51 +0200] “GET / HTTP/1.1” 200 10240 “https://mywhiskeynews.siterubix.com/” “RankMathChecker/2.0.0; https://rankmath.com”
The initial requests that come in are sent over http (port 80) and we respond with a 301 to https. These https requests are then met with a successful 200 response.
Are there other requests sent in from your API server that we are missing?
Thank you for your reply.
What we see is that every time we try to fetch the URL https://mywhiskeynews.siterubix.com/ through cURL, all we’re getting is the following error:
cURL error 28: Operation timed out after 30004 milliseconds with 673 out of 9817 bytes received
No matter how high we set the timeout limit, it’s always the same.
When we test with
file_get_contents()instead of cURL then it also times out but then we can read the “incomplete” data which seems to contain the whole page source. Perhaps the issue is related to the
Content-Lengthheader or to the gzip compression?
The same error happens when we change the
User-agent, but when we try the same request from a different server, it seems to work correctly.
Do you have some idea what could be causing this, or any suggestion on how to fix it?
With same problem
Did all above withe no change
My site: hhttps://getprint.co.il
So from what we gather here these cURL/file_get_content() http fetches are failing only on your API server, is that correct?
For example if the same cURL request is made from another of your servers it works as expected?
Perhaps running these cURL requests using the
--verboseoption could shed some light on the differences between serverA and serverB?
Would you also be able to provide the exact cURL command to replicate this issue? Either the cURL request made from a bash shell OR the PHP cURL code where we could create a simple test script…
If we can re-create this on our end then we can either resolve, but at the moment our requests through cURL or file_get_content() are all retrieving results as expected.
Here are the request headers we are seeing in our logs from your server:
array( 'PATH' => '/', 'x-forwarded-for' => '188.8.131.52', 'connection' => 'close', 'accept-encoding' => 'deflate, gzip', 'referer' => 'https://mywhiskeynews.siterubix.com/', 'accept' => '*/*', 'user-agent' => 'WordPress/5.3.2; https://rankmath.com', 'host' => 'mywhiskeynews.siterubix.com', 'METHOD' => 'GET', 'VERSION' => 'HTTP/1.1', 'URI' => '/', 'PATTERN' => '/', 'URL_SCHEME' => 'https', 'REMOTE_ADDR' => '184.108.40.206', )
That request is then responded with (a cached response):
HTTP/1.1 200 OK Date: Mon, 09 Mar 2020 18:13:51 GMT Server: Apache/2.4.37 (Debian) X-Powered-By: PHP/7.3.9 Link: <https://mywhiskeynews.siterubix.com/wp-json/>; rel="https://api.w.org/" Vary: X-Forwarded-Proto,X-WP-CORE-VERSION,Accept-Encoding Cache-Control: max-age=31536000 Expires: Tue, 09 Mar 2021 18:13:51 GMT Content-Encoding: gzip Connection: close Content-Type: text/html; charset=UTF-8 SiteSpeed: 6666cd76f96956469e7be39d750cc7d9.raw.gz 3.27 Content-Length: 9817
Another thing to test I think would be to remove gzip from the equation. Perhaps a non-gzipped request/response will work?
Thank you for following up on this and sorry for the late response.
We’ve done some further tests and we could not find what is causing the issue. The cURL request just never completes, regardless of the settings. Here is the complete output with the
* About to connect() to rankmath.siterubix.com port 443 (#0) * Trying 220.127.116.11... * Connected to rankmath.siterubix.com (18.104.22.168) port 443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * skipping SSL peer certificate verification * SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 * Server certificate: * subject: CN=*.siterubix.com,OU=Domain Control Validated * start date: Aug 27 18:32:05 2018 GMT * expire date: Aug 27 18:32:05 2020 GMT * common name: *.siterubix.com * issuer: CN=Go Daddy Secure Certificate Authority - G2,OU=http://certs.godaddy.com/repository/,O="GoDaddy.com, Inc.",L=Scottsdale,ST=Arizona,C=US > GET / HTTP/1.0 User-Agent: RankMathChecker/2.0.0; https://rankmath.com Host: rankmath.siterubix.com Accept: */* Accept-Encoding: deflate, gzip Referer: https://rankmath.siterubix.com/ Connection: close < HTTP/1.1 200 OK < Date: Mon, 16 Mar 2020 14:26:22 GMT < Server: Apache/2.4.37 (Debian) < X-Powered-By: PHP/7.3.9 < X-UA-Compatible: IE=edge < Link: <https://rankmath.siterubix.com/wp-json/>; rel="https://api.w.org/" < Vary: X-Forwarded-Proto,Accept-Encoding < Cache-Control: max-age=31536000 < Expires: Mon, 08 Mar 2021 20:13:46 GMT < Content-Encoding: gzip < Connection: close < Content-Type: text/html; charset=UTF-8 < SiteSpeed: 6666cd76f96956469e7be39d750cc7d9.raw.gz 3.31 < Content-Length: 5453 < * Operation timed out after 5002 milliseconds with 670 out of 5453 bytes received * Closing connection 0
When I request the non-gzip version by removing it from the
Accept-Encodingheader, then the result is the same, just the sizes in the error message are different:
Operation timed out after 5004 milliseconds with 17099 out of 17816 bytes received
Do you have any suggestions on what else we could try here?
I’d like to add that this issue seems to be unique to your server, it did not happen with any other site in the past, so it must be related to the server configuration.
Looking forward to your response.
- This reply was modified 3 months, 3 weeks ago by Balazs.
Thanks for the response Support.
Does this same issue occur with the domain
That domain is not hosted on our servers so we are just inquiring if this same issue is also present there.
Another test that could provide more infomation is to make a request to a static page asset. This will bypass our internal SiteSpeed caching server. This could help to either rule out the SiteSpeed server as the issue on our end – or it will prove to be the cause and we can take things further on our end to debug.
Try a cURL request against the following URL:
If that style.min.css request still fails, then at least on our end we will know it is not our SiteSpeed server.
Additionally, would you be able to make these requests using protocol HTTP 1.1 (vs 1.0)?
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
The ticket ‘API Error: Invalid server response.’ is closed to new replies.