Search code examples
reactjsaws-amplifygoogle-search-console

AWS Amplify defaults cause Google Search Console to get Not Found 404 for page that loads fine


My site just started being indexed by Google. It was telling me that a subpage was throwing 404s. When I copy/paste the page into the URL bar, it loads fine. The issue was Amplify defaults for "Rewrites and redirects", which didn't work for my React/Router app.


Solution

  • The defaults Amplify gave me were 404's for <> and a regex that redirects non-html pages. I removed the <> and changed the other one to a 200 instead of 404, and now it works correctly. Screenshots of Amplify (broken and fixed, respectively): Broken Defaults Working Fix