# Please show localhost subdomain canister ids after dfx deploy

**URL:** <https://forum.dfinity.org/t/please-show-localhost-subdomain-canister-ids-after-dfx-deploy/27417>\
**Category:** Developers\
**Created:** [February 8, 2024, 12:58am UTC](https://forum.dfinity.org/t/please-show-localhost-subdomain-canister-ids-after-dfx-deploy/27417 "2024-02-08T00:58:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lastmjs](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lastmjs/32/3406_2.png) [@lastmjs](https://forum.dfinity.org/u/lastmjs)\
**Post date:** [February 8, 2024, 12:58am UTC](https://forum.dfinity.org/t/please-show-localhost-subdomain-canister-ids-after-dfx-deploy/27417/1 "2024-02-08T00:58:09Z")

</div>

Right now after a dfx deploy canister ids are shown like this:

```auto
Deployed canisters.
URLs:
  Backend canister via Candid interface:
    dfinity_js_backend: http://127.0.0.1:4943/?canisterId=bd3sg-teaaa-aaaaa-qaaba-cai&id=bkyz2-fmaaa-aaaaa-qaaaq-cai
    ledger_canister: http://127.0.0.1:4943/?canisterId=bd3sg-teaaa-aaaaa-qaaba-cai&id=ryjl3-tyaaa-aaaaa-aaaba-cai

```

I ask that we also display the HTTP endpoints for use with curl, fetch, postman, the browser, etc which should really be `http://canisterId.localhost:port`.

I never recommend that anyone use the URL form listed above, why is it recommended? Using localhost subdomains works very well in I believe all situations I’ve encountered, whereas the form shown above does not. There’s an old forum post where this was a real problem when using non-bundled JavaScript or other fetching of assets as the canisterId was somehow lost along the way.

Anyway, as Demergent Labs tries to move people towards a REST-based paradigm, as I think is good for the entire IC, it would be great to show proper URLs. It’s confusing to people to not have them when working with Azle.

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [February 8, 2024, 8:23am UTC](https://forum.dfinity.org/t/please-show-localhost-subdomain-canister-ids-after-dfx-deploy/27417/2 "2024-02-08T08:23:44Z")

</div>

> [@lastmjs](#):
>
> Using localhost subdomains works very well in I believe all situations I’ve encountered

In that case you’ve never tried to use Safari. It simply does not recognize e.g. `bd3sg-teaaa-aaaaa-qaaba-cai.localhost` as a localhost address.

```auto
Deployed canisters.
URLs:
  Backend canister via Candid interface:
    dfinity_js_backend:
      - http://127.0.0.1:4943/?canisterId=bd3sg-teaaa-aaaaa-qaaba-cai&id=bkyz2-fmaaa-aaaaa-qaaaq-cai
      - http://bd3sg-teaaa-aaaaa-qaaba-cai.localhost:4943/?id=bkyz2-fmaaa-aaaaa-qaaaq-cai
    ledger_canister:
      - http://127.0.0.1:4943/?canisterId=bd3sg-teaaa-aaaaa-qaaba-cai&id=ryjl3-tyaaa-aaaaa-aaaba-cai
      - http://bd3sg-teaaa-aaaaa-qaaba-cai.localhost:4943/?id=bkyz2-fmaaa-aaaaa-qaaaq-cai

```

WDYT about this? Does this become too cluttered? Or do you have any better suggestions? We don’t really want to leave Safari users without any usable URL

---

<div class="post-metadata">

**Author:** ![frederikrothenberger](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/frederikrothenberger/32/3826_2.png) [@frederikrothenberger](https://forum.dfinity.org/u/frederikrothenberger)\
**Post date:** [February 8, 2024, 8:31am UTC](https://forum.dfinity.org/t/please-show-localhost-subdomain-canister-ids-after-dfx-deploy/27417/3 "2024-02-08T08:31:34Z")

</div>

@Vivienne: A solution that would work on all browsers is to switch to port based routing:

- canister 1: [http://localhost:7770](http://localhost:7770)
- canister 2: [http://localhost:7771](http://localhost:7771)
- canister 3: [http://localhost:7772](http://localhost:7772)
- canister 4: [http://localhost:7773](http://localhost:7773)
- …

---

<div class="post-metadata">

**Author:** ![lastmjs](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lastmjs/32/3406_2.png) [@lastmjs](https://forum.dfinity.org/u/lastmjs)\
**Post date:** [February 8, 2024, 1:48pm UTC](https://forum.dfinity.org/t/please-show-localhost-subdomain-canister-ids-after-dfx-deploy/27417/4 "2024-02-08T13:48:43Z")

</div>

Ah…Safari really doesn’t support localhost subdomains? That is sad. Yes I like the proposal you have here.
