PageSpeed Insights, a developer tool from Google for measuring up site speed is throwing an error regarding API key referrer restrictions. This bug has been prominently experienced by users using the Brave Browser. However, upon checking quickly, some Google Chrome users are also reportedly getting similar error but not that prevalent as compared to those that are using Brave.
The error occurs when you enter the URL to be submitted for testing and clicking the “Analyze” button. The test process is halted completely so no result is being shown on screen.
The complete error message goes like this:
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.
This error turns out to be a browser-specific one. Some users tried running different URLs and still get the same resulting error. Firefox, Safari, Opera and Microsoft Edge users however does not seem to get similar error.
Developers use PageSpeed Insights for testing the speed and integrity of their websites on both mobile and desktop platforms.
What Causes This Error?
It turns out that, the strong privacy and security feature of the Brave Browser can cause this error in PageSpeed Insights. The browser might be blocking some scripts necessary for running the tests.
How to Fix this PageSpeed Insights Error?
I think you guessed it already. The one thing that you can do to get rid of this error in Brave Browser is to just disable Brave Shields on this domain:
https://developers.google.com/speed/pagespeed/insights/
If you are using another browser and you experience this error, you can simply disable any adblocker that you are using to fix this issue.
It certainly worked for me personally. I hope that it worked for you too. Please let us know in the comments below if you were able to fix this PageSpeed Insights API Key Referrer Restrictions error.