The internet has come a long way from the basic websites and buggy browsers that it used to run. The modern internet is loaded with complex websites and web apps. That said, these sites are still far from perfect and keep running into issues from time to time.
In this article, we’re talking about the “Error 400: redirect_url_mismatch” issue that you can run into on some sites, the reasons behind it and what you can do to fix the problem.
Also read: How to fix โthe plain http request was sent to https portโ?
What causes this error?
The error mainly occurs when accessing an SSO for Google Sign-ins because the app doesn’t comply with Google’s OAuth 2.0 policy. Other reasons include:
- Internet connectivity issues.
- Typos in the redirect URI.
- Incorrect redirect URLs.
How to fix this?
You can try these x solutions to fix the problem.
Check your internet
If you’re a visitor to the site, check to see if you have a proper internet connection. If youโre on WiFi, make sure youโve got an active link and that there are no signal issues. On cellular data, ensure that itโs enabled and that youโre getting good network coverage.
Check the redirect URI
Check to see if the redirect URI has been registered in the API’s console and if it has been, whether it was done correctly or not. Check to see the client ID and client secret keys are correct and that the URI/URLs you’re using are all preset and correct as well.
Try multiple URLs
If the aforementioned fixes don’t work or you don’t have access to the Google API console backend, your best bet is to try a number of different URLs that might work for you. Some common variants include:
- Https://site.com
- Https://site.com/
- Https://www.site.com
- Https://www.site.com/
Also read:ย How to fix โurllib.error.httperror: HTTP error 403: Forbiddenโ?