-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Custom Domains don't work with Cloudflare #4395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Read the Docs did just sign up for Cloudflare for DNS on readthedocs.io. Our goal is to provide HTTPS for all the custom domains we host. You mentioned you followed the instructions but I don't see a CNAME for
Did you change that when you started receiving this error? I'd love to understand this as I'm actively working on it. |
We confirmed that the problem arose from the DNS change on readthedocs.io combined with our existing CloudFlare settings. We were already proxying through CloudFlare for their SSL support: This resulted in A records rather than CNAME:
Apparently when readthedocs.io started using CloudFlare it caused a situation where CloudFlare was perhaps attempting to proxy itself. We changed the settings on our end to bypass CloudFlare's proxy and our docs now load. New output from dig:
|
I'm glad it's working for you. I'm terribly sorry for the inconvenience. It sounds like incoming cross-user CNAMEs can be allowed so I'll see if I can set that up to avoid this problem for others. |
It's mostly working. What's missing is that it won't redirect http to https anymore. Is it possible to enable this for us on your end, or is there a setting that I can change? |
This is coming soon site wide. I'll see if there's a good way to do it for one site. |
We have a similar situation at UBports (and Halium) which either hasn't been resolved by the change, the change hasn't propagated to us yet, or we've misconfigured something...
(some output omitted) |
I can see you're using Cloudflare as your primary DNS:
However, I don't see any CNAME for those hosts:
Did you remove that or are you just using A records? |
We've set up the CNAME records at this point:
As expected, HTTP to HTTPS redirect isn't working but our docs are. |
docs.aiohttp.org has the same issue: aio-libs/aiohttp#3142 |
Same for https://cheroot.cherrypy.org |
I think I've found another workaround: |
This is a workaround. However, once we get this issue worked out please switch it back. By CNAMEing to |
Now I'm |
(the only problem that it now doesn't automatically redirect http->https) |
I'm working on this. There are a couple steps. The first one is that everywhere where we display a link to documentation to show the HTTPS link. This will uncover issues with certificates not successfully issuing and whatnot. The next step is to force HTTPS for all traffic to custom domains by redirecting. We're probably 1-2 weeks from the first and a bit more for the 2nd. Once those shake out, we'll look at HSTS because you can't back out of HSTS (by design). |
Thank you for the update! |
After talking with our fine contacts at Cloudflare, we have a solution. The problem here has to do with proxying a domain on Cloudflare to another domain that is also proxied on Cloudflare. This is a problem because it is unclear which domain rules to apply and where the SSL termination is going to happen. The solution is that only one proxy can be applied. If you want to allow Read the Docs to handle the proxying -- which means we are issuing a certificate for the domain -- then continue following our documentation by CNAMEing to If instead you want to handle proxying on your side -- which means you are responsible for the SSL certificate -- then set your CNAME to I will be updating our documentation in the next couple days. I'm also going to leave this ticket open for a few weeks for any issues to shake out. |
Sounds reasonable! Thanks :) |
The cloudflare-to-cloudflare variant doesn't appear to work (SSL certificate is for *.readthedocs.io instead of my hostname), and there is no cloud icon when using this variant. Instead I get:
I get the same for setting it to readthedocs.io, but that one works EDIT: it appears to work now, perhaps a temporary hickup |
This was probably due to the slowness of issuing an SSL certificate once you set your DNS. When you create the domain in Read the Docs' dashboard, we instruct Cloudflare to issue a certificate for the domain. Normally this takes just a few minutes (<10). However, you were just switching your DNS at the time, that has to propagate to Cloudflare and they have to retry the certificate challenge. That probably takes a bit longer. It sounds from the edit history that we are still talking sub 1 hour. |
I'm going to close this issue for now. I think this is mostly resolved and our docs include instructions on how to resolve this issue if you hit it again. |
Details
As of today afternoon, we started getting this error:
https://support.cloudflare.com/hc/en-us/articles/213432887-Error-1014-CNAME-Cross-User-Banned
http://docs.citusdata.com/
We followed the instructions here: https://docs.readthedocs.io/en/latest/alternate_domains.html#cname-support.
http://citus-docs.readthedocs.io/en/v7.4/
Expected Result
I presume RTD recently signed-up for Cloudflare, or the policy was just implemented recently. In either case, it seems like the documentation should be updated to account for both parties being on Cloudflare.
Actual Result
A description of what actually happened
The text was updated successfully, but these errors were encountered: