I am trying to host a canister under a custom domain following this documentation here Internet Computer Loading.
I am using goDaddy, I tried to set the DNS records correctly as per the documentation.
I then created the .well-known directory in the root directory, the one with the dfx.json file. Inside it I created the ic-domains as a plain file without any file type extension and put my custom domain name lilke foo.bar.com .
I aslo created the .ic-assets.json file in same root directory with the .well-known directory. and the dfx.json file and put the contents:
[
{
"match": ".well-known",
"ignore": false
}
]
and then deployed the canister on the ic.
That’s pretty much all the setup I followed, but now when I start the registration process with the following commnand:
I am gettin a bunch of data for the request and then finally this:
<
* Connection #0 to host icp0.io left intact
domain is missing from canister j62gc-2iaaa-aaaal-qbynq-cai list of known domain
This is where I am stuck, My guess is that maybe I put the .well-known directory and the
.ic-assets.json at wrong places. Where am I going wrong?
Thank you.
@peterparker , The custom domain is working now, but it seems like the frontend canister have lost its connection with the backend canister, It’s no longer querying items from backend if I access it using the custom domain name, but still working well if I use the canister id url, what other changes must I do so that the frontend and backend canisters keeps communicating with this new domain? I tried adding the new domain name to the CSP headers in the ic-assets.json file but it seems to have done nothing.
Thanks
Hi @peterparker, thank you for your advice, which guided me in adding the .well-known folder to the frontend public directory. The documentation wasn’t particularly clear on this, but your input made a difference.
I’ve successfully received a registration confirmation message, and the status query indicates that everything is available. According to the documentation, it may take a few hours for the changes to propagate. However, it’s been over 15 hours, and the custom domain still doesn’t display anything.
Do you have any suggestions on troubleshooting this issue?
* Connection #0 to host icp0.io left intact
{"name":"audionaut.xyz","canister":"km6x3-2iaaa-aaaap-qb36q-cai","state":"Available"}%
There is one part missing in your configuration:
The CNAME from audionaut.xyz to icp1.io. If you cannot set a CNAME for your domain with your registrar, then you might want to consider the alternatives explained here. In short, some registrars don’t allow CNAMEs for apex domains. Some offer an ANAME or ALIAS record instead. If nothing like that is possible, we recommend to switch to a DNS provider that allows CNAMEs for apex domains (e.g., Cloudflare).
Unfortunately, Amazon Route 53 doesn’t support CNAME for apex domains. You specified a CNAME for the subdomain @.audionaut.xyz and not audionaut.xyz.
You can verify that by directly querying the DNS records for you domain and you will see that the response is empty:
$ dig AAAA audionaut.xyz +short
$ dig A audionaut.xyz +short
I checked and it was actually a temporary issue. The system failed to remove the TXT record that it had to put in place for the ACME-challenge. However, all the steps are retried after failures. Hence, it worked in a later attempt and now your custom domain is available: