Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

240
Views
"Fetch as Google" doesn't load React routes on S3 with CloudFront

I have a react-router site on Amazon S3, with 404 redirects set to hit index.html, where they find the code they need and the site does what it should.

In Google Webmaster Tools, "Fetch as Google" for one of the routes gave error status: Not Found.

I set up Cloudfront for that origin with a Custom Error Response (404 to 200, with Response Page Path /index.html).

But "Fetch as Google" for one of the routes still shows error status: Not Found.

In Chrome or with curl, when I load http://[bucketname].s3-website-us-west-2.amazonaws.com/list/listname/username I see a 404 but the page then loads as expected.

But when I load http://[randomchars].cloudfront.net/list/listname/username I see a 200 with no re-direct and the page loads as expected.

I've submitted a sitemap with the relevant URLs I'd like indexed and asked Google to crawl the site. It hasn't been crawled yet, but my best hope right now are a couple of suggestions I've seen that "Fetch as Google" won't follow redirects, while Googlebot will when it actually crawls the site. I hope this is the case, but if I've missed any other obvious thing, I'd love to know. Thanks in advance!

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I found setting cloudfront with the response page path as "/" worked for me! I was stuck with the exact same problem.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!