# "Unknown host" when trying to login

**URL:** <https://community.auth0.com/t/unknown-host-when-trying-to-login/159408>\
**Category:** Get Help\
**Tags:** apis, application\
**Created:** [December 9, 2024, 8:53am UTC](https://community.auth0.com/t/unknown-host-when-trying-to-login/159408 "2024-12-09T08:53:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dschulz](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dschulz/32/60319_2.png) [@dschulz](https://community.auth0.com/u/dschulz)\
**Post date:** [December 9, 2024, 8:53am UTC](https://community.auth0.com/t/unknown-host-when-trying-to-login/159408/1 "2024-12-09T08:53:10Z")

</div>

Hello,

i’m trying to setup my react SPA with Auth0 and set it up exactly as the setup guide stated. Domain and Client ID are both correct. However, when trying to login with the “loginWithRedirect()” function I’m getting an error after the redirect: “Unknown Host”

Any ideas how to fix this? Help is greatly appreciated.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [December 9, 2024, 7:30pm UTC](https://community.auth0.com/t/unknown-host-when-trying-to-login/159408/3 "2024-12-09T19:30:44Z")

</div>

Hi @dschulz,

Welcome to the Auth0 Community!

The `Unknown Host` error happens when the domain you used for the login request does not match the domain for your tenant.

See screenshot:  
 ![image](https://global.discourse-cdn.com/auth0/original/3X/f/8/f8d5bbf59fe51a0815572bb5d518014c69e0db2e.png)

In this case, please make sure that your domain matches the following format: `https://YOUR_DOMAIN.REGION.auth0.com`

You can get your Domain by going to your [Application settings](https://manage.auth0.com/#/applications) and copying the domain specified there.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![dschulz](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dschulz/32/60319_2.png) [@dschulz](https://community.auth0.com/u/dschulz)\
**Post date:** [December 9, 2024, 10:05pm UTC](https://community.auth0.com/t/unknown-host-when-trying-to-login/159408/4 "2024-12-09T22:05:39Z")

</div>

That was actually the problem, can’t believe i missed that. thanks for the help!

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [December 10, 2024, 11:14pm UTC](https://community.auth0.com/t/unknown-host-when-trying-to-login/159408/5 "2024-12-10T23:14:51Z")

</div>

Hi @dschulz,

Of course, you’re welcome!

Please feel free to reach out again if you have any other questions.

Cheers,  
Rueben
