-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Cloudflare to Cloudflare CNAME Records #7801
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I believe we have fixed this issue. The only remaining issue is users who are proxying to us via some other hosting provider.
The current issue:
- User points
docs.example.com
to their hosting provider docs.example.com
is then proxied toreadthedocs.io
- We create a CF domain record for
docs.example.com
, which doesn't validate because it isn't pointing at CF - We remove the
docs.example.com
domain from CF as invalid - The proxy from
docs.example.com
to CF breaks, because CF doesn't know how to routedocs.example.com
without the domain object
I don't believe there is a way for us to fix this. Users that are proxying to us should probably point directly to our servers instead of CF (which is what the cf-to-cf
subdomain was for). We could also have our application have some kind of proxied
logic on the RTD Domain object, and then use that to not delete the CF records for these domains.
/cc @stsewd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't delete the domains, but there is a PR to be able to mark them as inactive and delete them after that, so users don't block the original user to setup a custom domain.
Recently I setup a cloudflare domain and only needed to disable the orange cloud.
@zachdeibert Did you use Cloudflare strictly for DNS (the gray cloud in their UI) or were you proxying the domain (the orange cloud)? Unless something has changed, the former should be fine and the latter is still a problem. |
When I created the record I had it set to proxy, but then once I clicked save it changed it to DNS only automatically |
Interesting. I wonder if Cloudflare does that automatically or something. |
Jumping on this issue as I recently quoted this PR in a Cloudflare discussion forum. In short, I'm not sure whether RTD needs to configure something to make a subdomain on Cloudflare work properly, or Cloudflare needs to give users more control on how to handle custom subdomains that alias to services running on Cloudflare. Right now, no configuration really works for me:
So maybe this prompts a new question which is, what would be the proper way to configure RTD with SSL and Cloudflare? |
@jjperezaguinaga Pointing to readthedocs.io and using HTTPS should definitely work. Is your domain "orange clouded" in that configuration? If it isn't, it should work. We're running that setup for thousands of domains without issue. |
Based on your record, you're using DNS only. You should not follow the special Cloudflare instructions. Those special instructions are only for folks proxying their domain. Edit: we probably need to update the docs to be more explicit. It doesn't help that this functionality has changed names a few times. It was the "orange cloud" but now it is proxying/DNS-only (which admittedly are clearer). |
@davidfischer RTD7801.mp4 |
This is interesting. They must have changed it. PS: thanks for the video. That's really helpful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for my delay in approval. Cloudflare had changed something out from under me (for the better, to be fair) and I still thought we needed this. This is definitely an improvement. I tested this myself in Cloudflare and I see the same "managed externally" message in Cloudflare.
I just set up a CNAME record in Cloudflare pointing to
readthedocs.io
and it got an SSL certificate for the custom domain so this seems to no longer be a problem.