# Using Custom domain with Universal login widget and Nextjs

**URL:** <https://community.auth0.com/t/using-custom-domain-with-universal-login-widget-and-nextjs/132634>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [April 23, 2024, 2:22pm UTC](https://community.auth0.com/t/using-custom-domain-with-universal-login-widget-and-nextjs/132634 "2024-04-23T14:22:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rinaldo.stevenazzi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rinaldo.stevenazzi/32/60320_2.png) [@rinaldo.stevenazzi](https://community.auth0.com/u/rinaldo.stevenazzi)\
**Post date:** [April 23, 2024, 2:22pm UTC](https://community.auth0.com/t/using-custom-domain-with-universal-login-widget-and-nextjs/132634/1 "2024-04-23T14:22:31Z")

</div>

Hello,

i’m using a regular web application using typescript and nextjs app-router with the @auth0/nextjs-auth0 sdk.

I choose Auth0 to get a fast and clean login flow with a B2C - Essentials plan.

I have a configured custom domain. This domain is verified, all good.  
I started to customize the login template using the auth-cli.  
I deployed my changes and i didnt get any result.  
I started to check documentation and understand what’s going on.  
I don’t have access to Auth0Lock, or auth0.WebAuth.

I tried several tricks like using initAuth0 with issuerBaseURL in the /api/auth/route.ts without result.

Can you explain the way to simply using custom domain with universal login, thx anyway.

---

<div class="post-metadata">

**Author:** ![rinaldo.stevenazzi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rinaldo.stevenazzi/32/60320_2.png) [@rinaldo.stevenazzi](https://community.auth0.com/u/rinaldo.stevenazzi)\
**Post date:** [April 23, 2024, 3:41pm UTC](https://community.auth0.com/t/using-custom-domain-with-universal-login-widget-and-nextjs/132634/2 "2024-04-23T15:41:31Z")

</div>

I have removed all customization from the login page. I used the default login page without customization. Like it is specify in the documentation : you do not need to make any changes !  
[Configure Features to Use Custom Domains](https://auth0.com/docs/customize/custom-domains/configure-features-to-use-custom-domains#universal-login).  
the AUTH0\_ISSUER\_BASE\_URL need to be updated anyway, with the custom domain ?  
im totally lost, please let me know how the things works together.  
thx

---

<div class="post-metadata">

**Author:** ![rinaldo.stevenazzi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rinaldo.stevenazzi/32/60320_2.png) [@rinaldo.stevenazzi](https://community.auth0.com/u/rinaldo.stevenazzi)\
**Post date:** [April 24, 2024, 12:29pm UTC](https://community.auth0.com/t/using-custom-domain-with-universal-login-widget-and-nextjs/132634/3 "2024-04-24T12:29:35Z")

</div>

The CNAM didn’t match the [auth0.com](http://auth0.com) url, on my configuration.  
just set the AUTH0\_ISSUER\_BASE\_URL with the custom domain.  
I didn’t feel lost anymore.  
thx

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [May 8, 2024, 12:30pm UTC](https://community.auth0.com/t/using-custom-domain-with-universal-login-widget-and-nextjs/132634/4 "2024-05-08T12:30:10Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
