1

I have several websites hosted on the same provider. No matter what site I try, I get a "timed out" error on the Google PageSpeed Insights site (https://developers.google.com/speed/pagespeed/insights/) when I enter any of my site URLs. It doesn't matter how large or how small the website is.

What I do is this: I enter my site's URL into Google's Page Insights "Enter a web page URL" textbox and click, "Analyze." The status bar reaches about 81% before I get the following error:.

"Lighthouse returned error: FAILED_DOCUMENT_REQUEST. Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Details: net::ERR_TIMED_OUT)"

When I look at Chrome's developer tools, it yields the following information about the script Google is using and where it is failing on their site:

PageSpeed 500 error

If I drill down to the URL of the API being used on Google's site, it is calling the runPagespeed method and returning a 403 error:

/*
{
  "error": {
    "code": 403,
    "message": "Requests from referer \u003cempty\u003e are blocked.",
    "errors": [{
      "message": "Requests from referer \u003cempty\u003e are blocked.",
      "domain": "global",
      "reason": "forbidden"
    }],
    "status": "PERMISSION_DENIED"
  }
}
*/

I'm lost as to why Google is returning a 403 error. I see nothing on my site's logs that indicates it's hitting a 403 error, so I can only assume the 403 error is on Google's end, or Lighthouse. Thanks in advance for any help or suggestions.

E. Emm T.
  • 11
  • 3
  • Your API key is either wrong or you have restrictions on your API key. – GrahamTheDev Jan 17 '21 at 18:22
  • Thanks, but this isn't my API. The error is being generated by Google's PageSpeed Insights site, not my own. I'm not using an API on any of my sites. I'm simply going to: https://developers.google.com/speed/pagespeed/insights/ and typing in my site's URL to have it generate a Page Speed report. But instead, it generates an error and times out. – E. Emm T. Jan 17 '21 at 18:29
  • what is your site URL, let me check something – GrahamTheDev Jan 17 '21 at 19:43
  • The error appears to be at your end, I can scan the site fine, do you happen to have any privacy plugins or firewall settings that might be interfering. – GrahamTheDev Jan 17 '21 at 23:25
  • Ok, this is really weird. If I use the TOR browser, then all of my sites load fine on PageSpeed Insights. I'm at a loss. Before TOR, I'd tried five other standard browsers: Chrome, Firefox, Firefox Developer edition, Edge and Brave. None of those worked. Two of those browser had plugins, but they were disabled. Is this an ISP issue? An Internet backbone provider issue? How would I go about pinpointing that? Is there a specific ISP firewall setting that is known to conflict with PageSpeed Insights? – E. Emm T. Jan 18 '21 at 02:03
  • To be fair I do not know, the only thing I can think of is that the referrer header is being completely stripped by your ISP or router. You often see a very similar issue with [brave browser with "shields up"](https://stackoverflow.com/questions/59508137/requests-from-referer-https-www-googleapis-com-are-blocked-error/59512854#59512854) - try following the general advice I give there about connecting to your phone on 4G and in incognito mode to rule out something on your device, if it still doesn't work that way it is device issue, if it does work then it is likely a firewall setting etc. – GrahamTheDev Jan 18 '21 at 02:47
  • I never quite understood exactly what causes this issue as I have never been able to replicate it myself but given the error message and brave's behaviour that is my best guess. – GrahamTheDev Jan 18 '21 at 02:48

0 Answers0