• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved ext-pagespeed-insights-task\analyze Forbidden - Requests from referer <empty> are blocked.

karam

Basic Pleskian
Hello Everyone,
Am getting a strange error when using Google PageSpeed Insights in Plesk,

"Forbidden - Requests from referer <empty> are blocked."

*API Key is set to not restrict anything.
I don't understand why it returns the referer <empty> .. any advises ?

Thank you.
 
Thank you @IgorG for respond,
The strange thing it is throwing me <empty>, I have no idea why it does so, the server is brand new, and Plesk is newly updated. and everything is very clean.

I tried the above, and I also completely disabled the API key restrictions. I don't know if there is a problem with the extension it self with plesk..

Note : It worked well in an old build in the server..and I didn't change my behavior in the new clean build.

Kind Regards,
Karam
 
*Update.
I did the following and the problem seems unexpectedly solved.

I generated a new API key from google.
And I re-installed the extension.

Also applied restrictions by IP so no one uses that API but my plesk server.. and it works now..

Just in case someone has the same problem in future. and thanks again @IgorG

Kind regards,
Karam
 
I have been reviewing the documentation and it is most likely that this error is due to IP address restrictions that are enabled for the API key in Google API Console but the server address is not allowed.

By the above, please follow the guide below in order to edit the API key and add the IP of the server:

Google PageSpeed Insights analyze task fails: Forbidden - The calling IP address does not match the IP restrictions configured on the API key
The link provided doesn't take to an active page. Can you please provide solution. Thank you!
 
The link provided doesn't take to an active page. Can you please provide solution. Thank you!
The following symptoms should be there:
  • Google PageSpeed Insights analyze task for the domain in Extensions > My Extensions > Google PageSpeed Insights fails with the following error message:
    Code:
    The task "task\analyze" has failed.
    API request couldn't be executed
    properly. Please try again!
  • The file /var/log/plesk/panel.log contains messages like the following:
    Code:
    ERR [extension/pagespeed-insights] Forbidden - The calling IP address 203.0.113.2 does not match the IP restrictions configured on the API key. Please use the API Console to update
    OR
    Code:
    ERR [extension/pagespeed-insights] Forbidden - The request did not specify any referer. Please ensure that the client is sending referer or use the API Console to remove the referer restrictions.
IP address restrictions are enabled for the API key in Google API Console but the server address is not allowed.

Use the following steps for resolving the issue:
  1. log in to Google API Console and go to the API credentials
  2. Edit the API key. Add the IP of the server to the list at Application restrictions > Accept requests from these server IP addresses. Click Save
    Note:
    It may take up to 5 minutes for settings to take effect
API_console.jpg

For more details refer to the Google API Console Help.
 
Back
Top