I have ex: mydomain.com
I need to make my file manager bucket link my domain with files.mydomain.com/
What I did
- create a bucket
files.mydomain.co
and make it public:
the bucket URL is: https://s3.me-south-1.amazonaws.com/files.mydomainn.co/contracts/mobile-82-qrcode.svg
Then I went to Route53 & put the URL of the bucket in CHNAME
of a subdomain:
The subdomain does not work!
Am I missing something!?
CodePudding user response:
A CNAME record is for the host only. So, for example, you can create a CNAME record from files.example.com
to s3.me-south-1.amazonaws.com
but not including both the protocol and sub-directory you show.
Additionally, you'll have SSL certificate issues doing this as the certificate is not for your domain.
Your best bet would be to use CloudFront to be in front of your S3 bucket. You'll be able to create a SSL certificate that matches your domain name and use the hostname you'd like. It's not free but it's very affordable.