R2 custom domain (with file path) got 404 error

I got 404 error after setting up custom domain (with a correct file path), even the generated URL on the website shows 404.

As the photo above, I enabled custom domains and public access, however, the Public Bucket URL (https://pub-3685f8333ca14f73b059c5bb2d1e3142.r2.dev//f8061c2e7082d11eb43cba66b8d9a126.webp) which has two slash in it shows a 404 error.
After manually removing the redundant slash after .dev the file can be accessed normally.
However, the custom domain (https://img.ynchen.me//f8061c2e7082d11eb43cba66b8d9a126.webp) still shows a 404 error, even after I remove the second slash.

I suspect this is a bug after some investigation

  1. I added a second domain https://img1.ynchen.me/f8061c2e7082d11eb43cba66b8d9a126.webp and it works fine
  2. The double slash // is a string concatenation bug

However, I still need the img domain so could someone fix this please :smiley:

I forget to mention that even without the double slash the img subdomain still responds 404 error and
img1 works, even though I add them the exact same way (and basically the only way).
For example https://img.ynchen.me/f8061c2e7082d11eb43cba66b8d9a126.webp still gets 404 but https://img1.ynchen.me/f8061c2e7082d11eb43cba66b8d9a126.webp works.

Hey, thanks for reporting this! There is, in fact a typo in the UI, I’ll fix that.
Your two domains behaving differently is curious though, do you have a Page/Transform rule or something on the one that does not work? Maybe that’s messing with things?

Thank you!
This is the reason that causes this problem, I accidentally left a transform rule running. I only disabled the page rule but forget that I also have a transform rule :smiley: .

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.