The error messages you provided indicate both a DNS and a possible web server configuration issue.
Lets check some items:
- Make sure the bucket has been set up for static website hosting and note the provided endpoint.
- Ensure you have an index document (e.g., index.html) in the bucket.
- For recruiteroo.de, ensure there's an A record in Route 53 with Alias set to the S3 website endpoint.
- The "404 not found / nginx" error indicates there might be a lingering server configuration associated with the domain or there's a misconfiguration at the DNS or CDN level.
- If you previously had a web server (like nginx) associated with this domain, ensure you've updated all DNS records to point to AWS services (S3/CloudFront) instead of the old server.
- Use tools like nslookup or dig to check DNS resolution for your domains.
When setting up a static website on S3, the bucket's content needs to be publicly accessible so that users can view the site. However, there are a few different approaches:
- Bucket Policy for Public Access: Traditionally, a bucket policy was set to grant public read access. This is effective and allows anyone to view the bucket's content.
- Using Amazon CloudFront (recommendation): For added performance and security, you can distribute your S3-hosted website with Amazon CloudFront. By using CloudFront, you benefit from faster content delivery via a Content Delivery Network (CDN), as well as the ability to use an SSL/TLS certificate for your custom domain.
I hope this helps! If this solution works for you, please accept the answer. Otherwise, do leave a comment, and I'll try to assist you.
If you want to also use an SSL Certificate, you should rather serve your static website with CloudFront. In this case you can use any S3 bucket as the origin, and configure an origin access identity in CloudFront to connect to S3.
There is a pretty comprehensive answer here by AWS Support on the details of using this approach: https://repost.aws/knowledge-center/cloudfront-serve-static-website
- Accepted Answerasked a month ago
- Accepted Answerasked 11 days ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 7 months ago
- Why isn't my domain record in Route 53 that points to an Amazon S3 bucket or static website resolving?AWS OFFICIALUpdated 2 years ago