• diviengine

    (@diviengine)


    Hi. Thank you for creating this awesome plugin.

    Trying to set up a custom domain using CloudFlare. I add the CNAME but it causes an error.

    Can I run past what I have done.

    The current URL for my bucket is (just an example):
    https://s3-eu-west-2.amazonaws.com/buket-name/uploads/20191118100536/image.jpg

    in CloudFlare I added the CNAME

    Name: cdn
    Content: cdn.buket-name.s3-eu-west-2.amazonaws.com

    Is this correct, as I get an error when I upload a new image and try and look at it.

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • jiggaman

    (@jiggaman)

    i believe your bucketname needs to be called: cdn-bucket-name

    so recreate a bucket called: cdn-bucket-name

    then create your cname: cdn-bucket-name to point to your s3 path

    and then your path cdn-bucket-name.yourdomain.com can work.

    The fix is not related to this plugin.

    • This reply was modified 3 months ago by jiggaman.
    diviengine

    (@diviengine)

    Thanks for this.

    If I change the CNAME record from “cdn” to “cdn-bucket-name” – then if I got to cdn.domain.com it will go nowhere.

    It is not directly related to the plugin but there is a tutorial for this and there is a setting to set a custom domain so it kind of is related.

    Are you saying to change the cname to be:

    name: cdn-bucket-name
    Content: cdn-buket-name.s3-eu-west-2.amazonaws.com

    Not sure how this will work?

    Thanks for the comment to help me

    diviengine

    (@diviengine)

    Figured it out.

    You need to have the bucket name as:

    cdn.domain.com

    and your cname record as:

    name: cdn
    content: cdn.buket-name.s3-eu-west-2.amazonaws.com

    This works for me now

    Plugin Contributor ianmjones

    (@ianmjones)

    jiggaman

    (@jiggaman)

    Actually…i think the correct url is cdn-bucket-name.domain.com then you create your cname cdn-bucket-name to point to cdn-bucket-name.s3-eu-west-2.amazonaws.com

    Right?

    Plugin Contributor ianmjones

    (@ianmjones)

    No @jiggaman, the bucket name must match the custom domain name you want to use, as per the “IMPORTANT” note at the top of the documentation that I linked to.

    This is a quirk of how Cloudflare accesses the bucket, most other CDNs can use normal bucket names.

    So, if your apex domain in Cloudflare DNS is “example.com”, and you want to use “cdn.example.com” as your custom CDN domain name, then you would create an S3 bucket called “cdn.example.com”.

    If that bucket was in the “eu-west-2” region, then you would add a CNAME entry to Cloudflare DNS with a name of “cdn” and a target of “cdn.example.com.s3-eu-west-2.amazonaws.com”.

    @ianmjones yes…argg…my bad.

    @diviengine @ianmjones

    I’m facing strange issue using the Cloudflare CDN.

    I’ve created a subdomain for example:
    images.domain.com

    My CNAME records as
    name: images
    content: images.domain.com.s3.ap-south-1.amazonaws.com

    What I noticed that the images are passing on the amazon bucket without any issues but when I try to preview the images under my WordPress Media Uploads then it shows images without a Thumbnail.

    Also, I noticed that whenever I try to access my bucket URL <images.domain.com.s3.ap-south-1.amazonaws.com> then it shows “Access Denied” message.

    I’ve already made my Amazon Bucket to public but still facing the same issue. Anyone please advice.

    • This reply was modified 2 months, 1 week ago by namanmodi.
Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.