Accessing a custom domain


Hello everyone, I’m having an issue when accessing a custom domain using a built-in browser. I can access it normally using https://xxx.icp0.io/. Is there any solution to this problem?

1 Like

image
When I disable the Service Worker while using a custom domain, the page cannot be accessed properly.

You likely have the service worker (SW) and the old index.html cached in your browser.
Clearing the cache or opening the website in an incognito window or forcing a refresh might resolve the issue.

1 Like

Hello, I’ve tried force refreshing after disabling the Service Worker, but it still shows 404. It only correctly recognizes the routed pages when I enter from the domain https://xxx.com, but if I access the routed page directly, it cannot recognize it.
I followed the steps in this document to set up a custom domain:
Using custom domains | Internet Computer.

Disabling the service worker might not work because if you have the index.html cached it will still lands on it, therefore this 404 sounds realistic to me.

Please share the URLs you are trying to access. Without knowning the website, one cannot confirm if the site works or not. It might be as well simply down.

1 Like

Wait are you trying to register a new domain or accessing an existing website?

I’m trying to access my frontend canister using my new domain, but currently, the custom domain cannot be accessed in a certain built-in browser, while the original ID works fine. The investigation suggests that the issue may be related to the Service Worker.
https://gwarc-biaaa-aaaak-akwua-cai.icp0.io/bridge?id=icrc
https://dapp.bitomni.io/

Thanks for the share. I indeed also have to load a service worker. What method are you looking to use to set up your custom domain?

Do you want to register the domain with the Boundary Nodes or do you want to host the domain on your own infrastructure?

If the first, there should be no service worker. If the latter, not sure how that work. In both case, someone else from the team will have to answer once we know what you are looking to achieve.

1 Like

image
image
image
Okay, thank you for your response. I am currently using the first option.

Great, thanks for the feedback. I’ll forward the information to the team.

1 Like

Hello @_Eric

could you please confirm what approach you used to set up your custom domain: Are you trying to

  • setup the custom domain on your own infrastructure (usage of the service worker seems to indicate that);
  • setup the custom domain on the boundary nodes;

We don’t really support setting up the custom domain on your own infrastructure as the service worker has been deprecated almost a year ago and is not being maintained anymore. We strongly advise you to use the service offered by the boundary nodes.

If you really, really want to run it on your own infrastructure, I recommend you to take a look at ic-gateway (here is the repo). It handles the certificates all on its own.

I understand, thank you :wink: very much for your response.

1 Like