Error configuring custom domain to a canister

Awesome. Thank you so much!

Hello @rbirkner

I was trying to register another domain and I got the same error as before:

{"name":"icphubkenya.com","canister":"ucnis-pqaaa-aaaal-qjgla-cai","state":{"Failed":"failed to delete dns record"}}
1 Like

Hey Stephen,

it was a transient error and the registration was just successfully completed:

{"name":"icphubkenya.com","canister":"ucnis-pqaaa-aaaal-qjgla-cai","state":"Available"}

Note that there might be errors while processing your registration. However, they are automatically retried and usually, they are just transient.

2 Likes

Hello @rbirkner

I am trying to configure another domain but I am encountering an issue. I have done everything correctly but when I run the command:

curl -sLv -X POST \
    -H 'Content-Type: application/json' \
    https://icp0.io/registrations \
    --data @- <<EOF
{
    "name": "friescoin.xyz"
}
EOF

I am getting the error:

domain is missing from canister k74i3-jyaaa-aaaal-qjdza-cai list of known domains

I have configured the domain correctly in my ic-domains file. You can even check it here: https://k74i3-jyaaa-aaaal-qjdza-cai.icp0.io/.well-known/ic-domains

This is how the record looks like on namecheap:

Where might the issue be coming from?

This looks all good to me. This error means that the boundary node cannot find the domain name in the file /.well-known/ic-domains. But as you say, the domain is there. I use this command to check:

$ curl https://k74i3-jyaaa-aaaal-qjdza-cai.icp0.io/.well-known/ic-domains
friescoin.xyz
www.friescoin.xyz%

Can you just try submitting the registration again?

Yes, I’ve been doing that for the last two days without any success. What might be the main issue :thinking: ?

Ok, I will give it a try and see what the issue is.

Hey @Stephen-Kimoi, I found the issue. Your ic-domains file contains a whitespace at the end of the line with friescoin.xyz. You can see it here when I request the file and then replace all whitespaces with an asterisk *:

$ curl -s https://$CANISTER_ID.icp0.io/.well-known/ic-domains | tr " " "*"
friescoin.xyz*
www.friescoin.xyz%

So you should just remove the whitespace and it should work. The custom domain service should be more forgiving and strip leading and trailing whitespaces. We already have a short list of improvements for the service and once we get to them, we will also tackle that.

Yes. Thank you so much!