# Configure Custom Domain

**URL:** <https://forum.dfinity.org/t/configure-custom-domain/22240>\
**Category:** Developers\
**Created:** [August 17, 2023, 9:37pm UTC](https://forum.dfinity.org/t/configure-custom-domain/22240 "2023-08-17T21:37:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamesbeadle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jamesbeadle/32/10110_2.png) [@jamesbeadle](https://forum.dfinity.org/u/jamesbeadle)\
**Post date:** [August 17, 2023, 9:37pm UTC](https://forum.dfinity.org/t/configure-custom-domain/22240/1 "2023-08-17T21:37:29Z")

</div>

Hello all,

I am trying to get a custom domain setup but I keep getting this:

![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/5/5e4605344d4311b38e49d2ad6dec72bcc3b725d1.png)

My github is here:

> **[GitHub - jamesbeadle/OpenFPL: OpenFPL](https://github.com/jamesbeadle/OpenFPL)**
>
> OpenFPL. Contribute to jamesbeadle/OpenFPL development by creating an account on GitHub.

Any help would be appreciated.

Kind regards,  
James

---

<div class="post-metadata">

**Author:** ![Gekctek](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/gekctek/32/6863_2.png) [@Gekctek](https://forum.dfinity.org/u/Gekctek)\
**Post date:** [August 17, 2023, 11:33pm UTC](https://forum.dfinity.org/t/configure-custom-domain/22240/2 "2023-08-17T23:33:47Z")

</div>

my guess is that your .ic-assets.json file has a ‘5’ at the end

> <https://github.com/jamesbeadle/OpenFPL/blob/master/src/OpenFPL_frontend/assets/.ic-assets.json5>

I think it wont include the .well-known since that name is off and then you get that error

---

<div class="post-metadata">

**Author:** ![jamesbeadle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jamesbeadle/32/10110_2.png) [@jamesbeadle](https://forum.dfinity.org/u/jamesbeadle)\
**Post date:** [August 18, 2023, 4:36am UTC](https://forum.dfinity.org/t/configure-custom-domain/22240/3 "2023-08-18T04:36:00Z")

</div>

Why has every project I created got an ic-assets.json5 if having this 5 at the end of the file is so bad?

I didn’t add the 5, dfx new did.

---

<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:** [August 18, 2023, 4:45am UTC](https://forum.dfinity.org/t/configure-custom-domain/22240/4 "2023-08-18T04:45:15Z")

</div>

Indeed `curl -l https://bgpwv-eqaaa-aaaal-qb6eq-cai.icp0.io/.well-known/ic-domains` does not return the expected domain.

When you `npm run build`, does your `dist` folder contains a `./well-known/ic-domains` file?

---

<div class="post-metadata">

**Author:** ![jamesbeadle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jamesbeadle/32/10110_2.png) [@jamesbeadle](https://forum.dfinity.org/u/jamesbeadle)\
**Post date:** [August 18, 2023, 5:04am UTC](https://forum.dfinity.org/t/configure-custom-domain/22240/5 "2023-08-18T05:04:18Z")

</div>

![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/4/458f446f09d7fc383e189dfa614223c714520a7c.png)

Yeah I’ve managed to get it to create the folder by making the following adjustment in my webpack:

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/a/af7c3e90b40eab858cb253cc37c73e1c7f7397eb.png)

---

<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:** [August 18, 2023, 6:18am UTC](https://forum.dfinity.org/t/configure-custom-domain/22240/6 "2023-08-18T06:18:42Z")

</div>

The issue was solved as following:

- remove `5` from `.ic-assets.json5` → `.ic-assets.json` as @Gekctek suggested
- remove duplicate files `.ic-assets.json` within repo (there was one in src and two in assets folder)
- keep a single `.ic-assets.json` in `src/frontend/assets`
- move `src/.well-known` to `src/frontend/assets/.well-known`
- update `webpack.config` to copy both `assets/.ic-assets.json` and `assets/.well-known` to `dist` folder

After clean-up and re-deploy, OP was able to order the custom domain.

P.S.: Since this is the second or third time this week that I provide support for the exact same issue, I would like to mention that this issue never occurs in [Juno](https://juno.build), where the configuration is automatically set for the developer.
