I’m getting 404 errors on a specific path pattern say xyz/index.html, how to return custom HTML content instead of a 404 Not Found error?
- October 31, 2022
- 62 views
- 0 votes
- 2 Answers
-
I’m getting 404 errors on a specific path pattern say xyz/index.html, how to return custom HTML content instead of a 404 Not Found error?
2
Answers
You can achieve this using CLoudfront Edge Functions:
us-east-1
region (irrespective of your local region).Trusted Relationships
to allow access for cloudfront.Capabilities
Go to your
Cloudfront Distribiution
you want to create a custom error page.Error Responses
There’s a blog post on how to do it step by step here.
Full documentation on generating custom error responses for Cloudfront is here.