Operation System: Ubuntu 18.04
Beaker version: 0.8.8
I own this website https://leprette.fr/site/ and I put a text file here https://leprette.fr/site/.well-known/dat that is accessible. I can even download it. My dat website is at dat://12ab4f2c5c42d6ae985679abfde3da7fcc4429050738524dca39dceaa3dc496c/. How can I make it accessible at dat://leprette.fr/site ?
Is there something I didn't get? Does it require time to be understood, like 24h?
Or as I fear, it would not work with a subdirectory website but only with root?
The problem is that I don't know how to put .well-known/dat at root of my name domain like https:leprette.fr/.well-known/dat because there is nothing at the root, I put a redirection to /site.
Well Known URI auto-discovery must be in the root directory of a domain. (See RFC 5785.) You must either move it there or you could redirect /.well-known/ to /site/.well-known/. You could also add a DNS record instead of using .well-known URIs. (I generally recommend using DNS over Well Known URIs.)
I thought that if I wanted my website to be accessible through https:// and dat:// I had to use .well-known/dat solution.
Now @da2x you are saying I can have both https:// and dat:// working using DNS record. How can I do that? I don't really understand this page https://www.datprotocol.com/deps/0005-dns/ .
I should write a DNS TXT record containing
NAME | TYPE | DATA
-----|------|------
@ | TXT | "datkey=12ab4f2c5c42d6ae985679abfde3da7fcc4429050738524dca39dceaa3dc496c"
But I thought, based on dat://beakerbrowser.com/docs/guides/use-a-domain-name-with-dat , this solution would work only for those who want to use their domain name with dat://, but don鈥檛 care about republishing their website on https://.
I do care. I want to keep https://
I tried to add this DNS TXT record and it worked,
dat://leprette.fr was working. I had to trick a bit to have the website also working on dat://leprette.fr/site .
However, https://leprette.fr stopped working. So I had to remove this DNS TXT record entry.
Any idea how to solve my problem? this problem?
I'd like very much to add my websites on dat web but I can't withdraw them from https:// .
Playing with nginx, I manage to make https://leprette.fr/.well-known/dat accessible so now it works on both https:// and dat://
Well I'd need to install beaker on an other computer to be sure. In the meantime, if someone could confirm me that it is working for both, that would be really nice.
Your web (http/https) is controlled by A and AAAA records. Your Dat website is controlled by the TXT record. They can coexist just fine.
Why do they distinguish both cases in here then? https://beakerbrowser.com/docs/guides/use-a-domain-name-with-dat
Why did my website was not responding on https:// when I add the TXT entry?
Maybe it was bad luck. I might try again. I agree that if it works with DNS, it is easier.
Why did my website was not responding on https:// when I add the TXT entry?
It should have no effect whatsoever. However, you may have a very unusual setup or DNS might just have been temporarily unavailable after you modified your DNS records.
@Thatoo, I'm having similar issues with my dat, so this is a great reference thread. I put dat://leprette.fr/site on my watchlist in Beaker but haven't seen it yet.
@krisradio please share links to any documentation you read and point out what parts were difficult to understand or confusing. Maybe we can identify some docs that need improving.
@da2x The two documentation pages I read were wiki page number one and number two.
Right now my understanding is on your https:// instance you put a dns.txt file that might look like this readout I get from AWS: | dns.krisrad.io. | TXT | "datkey=a08a449bf2bbcc6bd9b41df13fc522fbc18d83b303c6dc03b44f9093bf2dd498" | 25200.
Additionally in the folder .well-known you have a dat file that looks like
dat://a08a449bf2bbcc6bd9b41df13fc522fbc18d83b303c6dc03b44f9093bf2dd498
TTL=25200
Neither of these configs have been able to redirect my AWS instance to dat or Beaker. I do have other records on the AWS -- CNAME, SOA, NS, and A -- so it would be quite sensible to me that I'd need to change those, but it was not mentioned on either two wiki pages. I don't know what I'd change them to.
Besides the above questions about redirecting https:// requests to my dat url, there's also the question of how to redirect a dat:// well-known hostname to my dat url, which hasn't even really been touched on. The second article, under "Resolution Process", says
Client issues an HTTPS GET request to
https://{name}/.well-known/dat,
but how do I get https://{name} under my control in the _first_ place?
Thanks for reading.
dat://leprette.fr/site
You can't put sites in folders underneath a domain name. You can setup dat://leprette.fr as a dat domain, but you can't setup just dat://leprette.fr/site.
but how do I get https://{name} under my control in the first place?
You should have registered the name and pointed your DNS A record to a server you control.
Ok, in trying to adjust the "www.well-known.com" CNAME file on AWS, I get the following error message.
DomainLabelTooLong (Domain label is too long) encountered with '"datkey=a08a449bf2bbcc6bd9b41df13fc522fbc18d83b303c6dc03b44f9093', Unparseable CNAME encountered]
In trying to save the A DNS record (per the beaker browser guide), I get the following AWS error:
The record set could not be saved because:
- The Value field contains invalid characters or is in an invalid format.
So is this setup just _incompatible_ with AWS's parsing?
I do have, as I said, a dns txt file:
krisrad.io. | TXT | "datkey=a08a449bf2bbcc6bd9b41df13fc522fbc18d83b303c6dc03b44f9093bf2dd498" | 25200
It doesn't appear to be redirecting my dat://krisrad.io queries in Beaker to my Dat address.
Nevermind, dat://krisrad.io is totally redirecting to my full dat address! https also does from inside Beaker! Firefox does not redirect to dat from https, but it does fwd dat to Beaker. Obviously the big five prefer https.
And the AWS are just pointing to GitHub Pages. All except for the dns.txt file -- which I imagine is what Beaker looks for, rather than going to GitHub and then checking .well-known/dat?
I'm not actually sure what dns.txt is. If you're doing a DNS record, you should be setting that entry via your DNS manager. It's a "TXT" record, not a .txt file.
Ok, I'm pretty sure it's a "TXT" record. I should have given the column names on AWS:
Name | Type | TTL | Value
| | | |
krisrad.io. | TXT | 25200 | "datkey=a08a449bf2bbcc6bd9b41df13fc522fbc18d83b303c6dc03b44f9093bf2dd498"
I removed everything I did abut .well-known and I registered a TXT record in my DNS manager and it works very well.
Good deal! closing the issue