Search code examples
pagespeed-insights

How to fix "The referrer https://www.googleapis.com/ does not match the referrer restrictions..."


Here is what I have done. Keep in mind that I am logged in to the browser as admin for a G Suite account under the domain in question.

  1. I go to PageSpeed Insights url https://developers.google.com/speed/pagespeed/insights/
  2. I enter my website into the box
  3. ERROR: The referrer https://www.googleapis.com/ does not match the referrer restrictions configured on your API key. Please use the API Console to update your key restrictions

    a. How does google know that I had not configured a key?

    b. What key?

    c. there is no link to "my" API console (I did not know I had one)

  4. Search API Console and get (eventually): https://console.developers.google.com/apis/

  5. Stare and despair..."Page not viewable for organizations. To view this page, select a project" (what?). I see credentials (don't click it, not yet, i did, you'll regret it)
  6. Looooooooong story short, I figure I have to create a project first.
  7. At this point I have no idea what I am doing, WHAT I am creating or especially: WHY.
  8. click on Enable Apis, select PageSpeed, Click on Create blah blah blah.
  9. Now click Create credentials (we are back to the api page). This is a delightful nightmare... the important part, in "calling it from" USE: "a server", is the only one that works! (wonder why the other choices, specially "from browser" since that seems to me is what I was doing)
  10. Now there is a key sitting there. Now what?
  11. I go to point 1 and repeat this list with tiny variations 50 times

Domain in question: https://niagarafallsbus.com


Solution

  • SOLVED: I was using Brave Browser with "shields up".