{"action":"created","issue":{"url":"https://api.github.com/repos/ipfs/notes/issues/92","labels_url":"https://api.github.com/repos/ipfs/notes/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/ipfs/notes/issues/92/comments","events_url":"https://api.github.com/repos/ipfs/notes/issues/92/events","html_url":"https://github.com/ipfs/notes/issues/92","id":123898945,"number":92,"title":"IPFS gateway tag in DNS TXT","user":{"login":"Kubuxu","id":2259282,"avatar_url":"https://avatars.githubusercontent.com/u/2259282?v=3","gravatar_id":"","url":"https://api.github.com/users/Kubuxu","html_url":"https://github.com/Kubuxu","followers_url":"https://api.github.com/users/Kubuxu/followers","following_url":"https://api.github.com/users/Kubuxu/following{/other_user}","gists_url":"https://api.github.com/users/Kubuxu/gists{/gist_id}","starred_url":"https://api.github.com/users/Kubuxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kubuxu/subscriptions","organizations_url":"https://api.github.com/users/Kubuxu/orgs","repos_url":"https://api.github.com/users/Kubuxu/repos","events_url":"https://api.github.com/users/Kubuxu/events{/privacy}","received_events_url":"https://api.github.com/users/Kubuxu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-25T22:00:55Z","updated_at":"2016-01-13T20:42:37Z","closed_at":null,"body":"Currently looking for dnslink is a way to check if site is hosted on IPFS via gateway.\r\n\r\nI propose that we use other TXT entry specifying that this domain should be served under IPFS/NS.\r\n\r\nIt could be `TXT IPFS-Gateway=true`. Simpler nature of this entry means that it can have much longer TTL and can be cached for much longer time.\r\n\r\nAs workaround of lack of TXT record support in browsers we would need API endpoint for checking it.\r\n\r\nAlso it would be great if we could have agree on some sane default TTL in case of `dnslink` and this entry are missing thus increasing cache hits even more.\r\n\r\nEDIT: Also as `dnslink` gets support for `_dnslink.` prefix something similar might be done in case of this also."},"comment":{"url":"https://api.github.com/repos/ipfs/notes/issues/comments/171426408","html_url":"https://github.com/ipfs/notes/issues/92#issuecomment-171426408","issue_url":"https://api.github.com/repos/ipfs/notes/issues/92","id":171426408,"user":{"login":"lidel","id":157609,"avatar_url":"https://avatars.githubusercontent.com/u/157609?v=3","gravatar_id":"","url":"https://api.github.com/users/lidel","html_url":"https://github.com/lidel","followers_url":"https://api.github.com/users/lidel/followers","following_url":"https://api.github.com/users/lidel/following{/other_user}","gists_url":"https://api.github.com/users/lidel/gists{/gist_id}","starred_url":"https://api.github.com/users/lidel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lidel/subscriptions","organizations_url":"https://api.github.com/users/lidel/orgs","repos_url":"https://api.github.com/users/lidel/repos","events_url":"https://api.github.com/users/lidel/events{/privacy}","received_events_url":"https://api.github.com/users/lidel/received_events","type":"User","site_admin":false},"created_at":"2016-01-13T20:42:37Z","updated_at":"2016-01-13T20:42:37Z","body":"We already have a handy DNS query API provided by go-ipfs which returns `dnslink`  value:\r\n\r\n`GET http://localhost:5001/api/v0/dns/ipfs.io`\r\n```json\r\n{\"Path\":\"/ipfs/QmSrk8wCZ9oUgSCxJq4TXyJnPBYfoLDpKLGn7hLPNzauVX\"}\r\n```\r\nand for site without `dnslink` in `TXT` record:\r\n\r\n`GET http://localhost:5001/api/v0/dns/google.com`:\r\n\r\n```json\r\n{\"Message\":\"could not resolve name.\",\"Code\":0}\r\n```\r\n\r\nQuick idea/brain dump:\r\n\r\nPerhaps it could additionally return something like `{\"Path\": \"(..)\", \"HTTPMirror\": true}` if `TXT` record includes `httpmirror` keyword:\r\n\r\n    ipfs.io. 76 IN TXT \"httpmirror;dnslink=/ipfs/QmSrk8wCZ9oUgSCxJq4TXyJnPBYfoLDpKLGn7hLPNzauVX\"\r\n\r\nIt would be (kinda) reverse of `dnslink`: indicate that queried host provides real IPFS resources under `/ipfs/` and `/ipns/` which can be safely loaded from IPFS instead of HTTP."}}