Boundary nodes for API and web traffic

Why are there two domains ic0.app and icp0.io for API and web sites respectively? Couldn’t one URL been sufficient?

Furthermore the documentation states that for canisters deployed as web servers the URL to the gateway is https://<canister_id>.icp0.io. What is the reason for the <canister_id> to be part of the URL like a subdomain as opposed it being perhaps part of the payload? Thanks in advance.

2 Likes

In this thread you can find the historical context: [FOLLOW UP ON ITEM] New canisters will only be accessible through the icp0.io domain. Existing canisters will be accessible both through ic0.app and icp0.io

It would make development way more painful and links may not work as expected. If the canister id is in a query parameter then SPAs break. If it’s in a header then ordinary links would not work

If you want to try the no-subdomain approach try developing a dapp with Safari as your browser (painful, don’t actually do this!). Safari does not support localhost subdomains and it makes everything harder

1 Like