6

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!

2
  • Duplicate to this reactjs - fetch as google displays blank page only Commented Jul 15, 2018 at 14:40
  • 1
    @shivamsupr It is not a duplicate. OP can't see routes in "Fetch as Google" at all Commented Aug 30, 2018 at 16:02

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

1 Comment

I'm not working on the relevant project any more, but if that's all it was, I sure wish I'd tried that!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.