Why does Google OAuth redirect to a 404 page?
Cloud On-Premise
If the Google authentication process fails or redirects to a 404 page containing ?.profile, this is usually caused by a web server configuration issue.
The Search Keywords Performance feature uses a Google OAuth redirect flow that relies on the web server correctly handling URLs that contain .profile. For example, the following URL should not return a 404 error:
https://example.com/matomo/?.profile
Review your web server rewrite rules and routing configuration to ensure requests containing .profile are correctly handled by Matomo.
After updating the configuration, retry the Google authentication process.