Trying to add my custom domain - i am on NameCheap

I am trying to add a custom domain to my canister i followed everything here : Internet Computer Loading

After running this code with my own domain - i get the error message below:

curl -sLv -X POST
-H ‘Content-Type: application/json’
https://icp0.io/registrations
–data @- <<EOF
{
“name”: “myowndomain.com
}
EOF

Error message: domain is missing from canister 5osq2-id-aaaap-abbwq-cai list of known domains%

What am I missing here? also, this file .ic-assets.json5 keeps being created in the dist folder everytime that i build and deploy - please help.

Let me ping some folks who may know.

1 Like

Yes, the URL is accurate - should it be the. full URL , for example: www.example.com or just example.com ?

Also, can you explain a bit more? what do you mean the accessibility? what i provided here is only an example.

It looks like the canister ID (5osq2-id-aaaap-abbwq-cai) that you provided is not a valid canister ID. Are you sure you put the right canister ID in the TXT record of _canister-id.myowndomain.com?

Here i have attached what i have - hope you don’t mind i hide the full ID - the ID that i listed in the comment is not correct - but i have the correct one added in the registrar.

Hi @bblist

Thanks a lot for providing a bit more details. Your configuration looks good. The problem is with the ic-domains file that you need to host under your-canister.icp0.io/.well-known/ic-domains.

As part of the registration process, the boundary checks that your custom domain appears under this path. You can try it yourself by issuing the following command from the terminal:

curl -A "googlebot" https://<your_canister_id>.icp0.io/.well-known/ic-domains

The response should look like similar to this:

mydomain.com
www.mydomain.com

I hope that helps :slight_smile:

1 Like

this command returns an html snippet

<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width,initial-scale=1"/>
    <title>KawaK</title>
    <script defer="defer" src="index.js"></script>
</head>
<body class="mode-dark dark:bg-[#1f2933]">
<link rel="stylesheet" href="css/shepherd-theme-arrows.css"/>
<div id="app" class="dark:bg-[#1f2933]"></div>
</body>
<script>var _paq = (window._paq = window._paq || []);
    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
    _paq.push(["trackPageView"]);
    _paq.push(["enableLinkTracking"]);
    (function () {
      var u = "https://kawak.matomo.cloud/";
      _paq.push(["setTrackerUrl", u + "matomo.php"]);
      _paq.push(["setSiteId", "1"]);
      var d = document,
        g = d.createElement("script"),
        s = d.getElementsByTagName("script")[0];
      g.async = true;
      g.src = "//cdn.matomo.cloud/kawak.matomo.cloud/matomo.js";
      s.parentNode.insertBefore(g, s);
    })();
</script>
<script src="./shepherd.min.js"></script>
</html>

for me and I have my domain name added to the ic-domains file already

Hi @marvin,

just to make sure:

  • You have a file under .well-known/ called ic-domains, which contains your domains;
  • You have a file called .ic-assets.json at the root of your canister with at least the following content:
    [
        {
            "match": ".well-known",
            "ignore": false
        }
    ]
    

If that’s case, please share your canister-id/custom domain with us (also over DM), such that we can investigate.

Hi, double check that you have in your ic-domains file both domains:

for example:

You can refer to this page to fix the issue:

https://forum.dfinity.org/t/re-trying-to-add-my-custom-domain-i-am-on-namecheap/20261