Error 1014 after conecting a r2 bucket to my domain

What is the name of the domain?

example.com

What is the error number?

Error 1014 CNAME Cross-User Banned

What is the error message?

You’ve requested a page on a website that is part of the Cloudflare network. The host is configured as a CNAME across accounts on Cloudflare, which is not allowed by Cloudflare’s security policy.

What is the issue you’re encountering

Can’t acces my website anymore

What steps have you taken to resolve the issue?

I’ve been trying to solve this problem for over 24 hours. I’ve created an R2 bucket, I’ve tried several times, I’ve followed all the recommendations but as soon as I connect my domain to my bucket, my site is no longer accessible. I don’t understand the error message, because it’s the same domain.

Screenshot of the error

Looks like you’re trying to access WordPress admin area, however if you’ve connected your R2 bucket with main (root) domain soltannissya.com, unfortunately you’re unable to access it since the service behind the main domain which you’re using seems to be on a Cloudflare network, or already using Cloudflare, therefrom you should be able to use unproxied :grey: (DNS-only) for that particular CNAME.

However, have you considered using a sub-domain such as storage.soltannissya.com for Custom domain for your R2 Bucket? :thinking:

Cross-check your connected R2 custom domain (main domain?), unhook and remove it. Double-check and add missing A type of the DNS records pointed to your web hosting origin (or maybe it was CNAME) so your WordPress would continue to work propperly.

You can review the Audit logs using below article in case you aren’t sure or don’t know which DNS record was modified since you’ve connected your (main domain?) to your R2 bucket and lost access to the WordPress website.

Thank you very much for this
quick response. How can I use a sub-domain, just use storage.soltannissya.com or media.soltannissya.com? There is nothing else to configure? Do these sub-domains already exist?

I disconnected the domain from my bucket and had to add an A type to point to the ip address of my site. And my site is working again.

Thank you for asking and feedback.

You just need to write it as “custom domain” to your R2 bucket after clicking on the “Connect button”.

The DNS record will be created and once done, you’d see “Active | Allowed” green statuses in few minutes later.

Check if you already have some on the list “Active | Allowed” → should be your main (root) domain if I am understanding correctly.

We can check this by navigating to the DNS tab and searching for such A type records. Kindly, check if you possibly have an “apex” * DNS record on the list (which would need to be removed since it does mimic all the sub-domains and you cannot use it alongside subA, subB when you need and want).
Direct link → https://dash.cloudflare.com/?to=/:account/:zone/dns/records.

Example:

Fantastic news! Can confirm it’s loading from my side as well now:

Hello, the site is indeed up and running again, thanks again. And I managed to connect my bucket to a sub-domain without crashing my site.
Things get complicated again though when I try to use a plugin, Advanced Media Offloader, to connect it to my bucket. I’ve configured the plugin correctly, following the instructions, the connection test is successful, the ohhload is performed, I can find the elements copied to Cloudflare, but - and there’s another but - the problem is that once in place, the photos, for example, are listed but are not visible in the library. They’re only visible if I switch to “Edit” mode. If I want to use them as thumbnails, for example, it doesn’t work. The same goes for videos. Do you have any idea where this could go wrong? Thanks

Thank you for feedback.

Sounds like the Advanced Media Offloader pushes the images to R2 bucket, however seems there are “moments” just before upload as the request to the image might return 404 to the list of your Media Library, while a moment after it’s being uploaded to the bucket and exist there as well - if you could confirm by checking and searching both your R2 Bucket and physical location on your web server under the /wp-content/uploads/ directory?

Could be that for a particular URL, when WordPress requests it to show upon successfull upload, the returned result is cached as 404 1st time instead for requesting it from the R2 bucket. Especially could be this case if the “search” of Media Library retrives or rewrites the URLs to load them from R2 bucket.

I’ve had this issue and come up writing my own plugin which upon upload to R2 bucket, it fires the event to Purge the cache via Cloudflare API only for those particular URL of the uploaded files, and moment after I can see the thumbnails in my Media Library “modal” (pop-up window) normally.

May I ask if you’ve checked the Console and Network tab of the Developers Tools (F12), upon you upload them, do they appear as 404 there? :thinking:

If that’s the same case, then we could write to the developer of such plugin to cross-check and make sure they implement a way to fire and use API Token to Purge the cache of the uploaded files to R2 bucket.

Obviously, after upload, there are some miliseconds in difference between the request or after it, therefrom this might be the reason and need for such quick and easy fix to Purge the cache for those uploaded files.

Nevertheless, what are you Cache Rules or other caching related settings for your custom sub-domain of R2 bucket? :thinking:
Maybe if you temporary create a Transform Rule → Modify Response Headers, to disable caching for your R2 bucket sub-domain, just for testing to see if it its due to the cache in your case?

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