Skip to content
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

Set up CNAME to cloudflare-ipfs.com when one doesn't exist #145

Open
agentofuser opened this issue Feb 27, 2020 · 3 comments
Open

Set up CNAME to cloudflare-ipfs.com when one doesn't exist #145

agentofuser opened this issue Feb 27, 2020 · 3 comments
Labels
kind/enhancement A net-new feature or improvement to an existing feature

Comments

@agentofuser
Copy link
Collaborator

When deploying a new website using the Cloudflare DNS, ipfs-deploy --dns cloudflare sets the _dnslink TXT record, but not the CNAME.

This means that accessing the new website from an IPFS gateway (local or public) works, but going to the domain's dnslinked address directly results in a DNS error.

By default, ipfs-deploy opens the browser to this new dnslinked address right after pinning it and creating the _dnslink record, so it's confusing/jarring to get an error screen from the browser when everything actually worked fine.

One solution would be to automatically set up the CNAME record as well (if it doesn't yet exist), changing the behavior of the --dns flag.

If making the distinction more explicit is desired, the --dns flag could be deprecated (but keep working for now) and two separate flags, like --dnslink and --cname could be created, though I'm not sure the added cognitive load is worth it.

@agentofuser agentofuser added the kind/enhancement A net-new feature or improvement to an existing feature label Feb 27, 2020
@Macil
Copy link

Macil commented Feb 28, 2020

I personally wouldn't expect the tool to do first-time setup like this on the same command that's used for routinely updating the dnslink record. If I hadn't seen this thread, I could imagine this having bit me soon because I'm planning on switching my domain away from being CNAMEd as cloudflare-ipfs.com to my own server which similarly serves from ipfs using the dnslink but also adds some niceties like HTTPS redirect, HSTS, and more specific caching headers.

@agentofuser
Copy link
Collaborator Author

@Macil that's a good point. Thanks for adding that usecase. So if I understand correctly you're still going to use Cloudflare for the TXT _dnslink record but point the CNAME (still using Cloudflare name servers) to your own server?

@Macil
Copy link

Macil commented Feb 28, 2020

Right. (Well it most likely wouldn't be a CNAME, but just A/AAAA root records pointing to my server.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants