# Configure path redirect on asset canster

**URL:** <https://forum.dfinity.org/t/configure-path-redirect-on-asset-canster/28744>\
**Category:** Developers\
**Created:** [March 22, 2024, 11:19am UTC](https://forum.dfinity.org/t/configure-path-redirect-on-asset-canster/28744 "2024-03-22T11:19:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Litzi](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/litzi/32/5558_2.png) [@Litzi](https://forum.dfinity.org/u/Litzi)\
**Post date:** [March 22, 2024, 11:19am UTC](https://forum.dfinity.org/t/configure-path-redirect-on-asset-canster/28744/1 "2024-03-22T11:19:10Z")

</div>

Hi, I’m wondering if it is possible to configure redirect logic within an asset canister. What I want to achieve is:

When the User navigates to `https://my-custom-domain.com/`  
Then the asset Canister redirects to `https://my-custom-domain.com/prefix/`

Is it possible to achieve that by canister configuration without adding custom logic to the asset canister?

Thanks for any hints 🙏

---

<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:** [March 22, 2024, 12:36pm UTC](https://forum.dfinity.org/t/configure-path-redirect-on-asset-canster/28744/2 "2024-03-22T12:36:10Z")

</div>

I once redirected to `/myfile.txt` using this as my `index.html`:

`<meta http-equiv="refresh" content="0; URL=/myfile.txt" />`

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [March 22, 2024, 12:46pm UTC](https://forum.dfinity.org/t/configure-path-redirect-on-asset-canster/28744/3 "2024-03-22T12:46:40Z")

</div>

As far as I’m aware, dfx asset canister currently does not support server side functionalities like `redirects` or `rewrites`; these features are likely on the IC only supported by Juno at the moment.

@NathanosDev is developing a Rust crate aimed at integrating those kind of features easily in any certified asset canister. Should the asset canister adopt this crate in the future, it’s likely it will supports those as well.

> **[Hosting | Juno](https://juno.build/docs/build/hosting#what-can-you-configure)**
>
> Juno Hosting offers fast and secure hosting powered by 100% blockchain technology.

---

<div class="post-metadata">

**Author:** ![NathanosDev](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/nathanosdev/32/7204_2.png) [@NathanosDev](https://forum.dfinity.org/u/NathanosDev)\
**Post date:** [March 22, 2024, 12:57pm UTC](https://forum.dfinity.org/t/configure-path-redirect-on-asset-canster/28744/4 "2024-03-22T12:57:30Z")

</div>

The plan is definitely to have the asset canister adopt the library, but I can’t say what features the asset canister will choose to expose to end users.

In any case, the goal is to make it super simple for developers to make custom asset canisters and have flexibility to define their own routing logic so any advanced cases not supported by the asset canister can be acheived easily by directly using the library.

---

<div class="post-metadata">

**Author:** ![Litzi](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/litzi/32/5558_2.png) [@Litzi](https://forum.dfinity.org/u/Litzi)\
**Post date:** [March 22, 2024, 1:47pm UTC](https://forum.dfinity.org/t/configure-path-redirect-on-asset-canster/28744/5 "2024-03-22T13:47:31Z")

</div>

Cool, I think that could solve it for me. Will give it a try 🙏
