# Getting redirected to localhost instead of the website hosted on localhost

**URL:** <https://community.auth0.com/t/getting-redirected-to-localhost-instead-of-the-website-hosted-on-localhost/86927>\
**Category:** Get Help\
**Tags:** auth0, login\
**Created:** [July 13, 2022, 6:31pm UTC](https://community.auth0.com/t/getting-redirected-to-localhost-instead-of-the-website-hosted-on-localhost/86927 "2022-07-13T18:31:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mithilesh.khadekar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mithilesh.khadekar/32/38683_2.png) [@mithilesh.khadekar](https://community.auth0.com/u/mithilesh.khadekar)\
**Post date:** [July 13, 2022, 6:31pm UTC](https://community.auth0.com/t/getting-redirected-to-localhost-instead-of-the-website-hosted-on-localhost/86927/1 "2022-07-13T18:31:28Z")

</div>

I have hosted a website on IIS localhost.  
I have added the website url into the callback setting on the auth0 application setting.  
 ![image](https://global.discourse-cdn.com/auth0/original/3X/f/5/f54b6e82622e54f30c83352fa1a95ce63cbd3de8.png)

But despite of that, after successful login, I am being redirect to default IIS localhost page instead of my website.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/2/2/22632603f0268c82620588ee0d51e7f19f979fe0.png)

The .har file is attached.  
[login callback.har](https://community.auth0.com/404) (192.1 KB)

My access control code in my blazor app looks like this -

```auto
<AuthorizeView>
    <Authorized>        
        <a href="logout">Log out</a>
    </Authorized>
    <NotAuthorized>
        <a href="login?redirectUri=/">Log in</a>
    </NotAuthorized>
</AuthorizeView>

```

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [July 14, 2022, 12:01am UTC](https://community.auth0.com/t/getting-redirected-to-localhost-instead-of-the-website-hosted-on-localhost/86927/2 "2022-07-14T00:01:56Z")

</div>

Hi there @mithilesh.khadekar!

> [@mithilesh.khadekar](#):
>
> But despite of that, after successful login, I am being redirect to default IIS localhost page instead of my website.

It sounds like your app is successfully redirecting post-login - That’s good! I’m admittedly not familiar with Blazor but I imagine you have had a chance to look this [blog post](https://auth0.com/blog/what-is-blazor-tutorial-on-building-webapp-with-authentication/)? Auth0 will just redirect the url defined in any sort of app config related to the specific SDK/technology. I see that you’re redirected to `https://localhost/GrowkshPMSDashboard/callback` in the HAR file, but I do not see a full authorize request wherein there would be a `redirect_uri` param.

---

<div class="post-metadata">

**Author:** ![mithilesh.khadekar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mithilesh.khadekar/32/38683_2.png) [@mithilesh.khadekar](https://community.auth0.com/u/mithilesh.khadekar)\
**Post date:** [July 14, 2022, 7:21pm UTC](https://community.auth0.com/t/getting-redirected-to-localhost-instead-of-the-website-hosted-on-localhost/86927/3 "2022-07-14T19:21:16Z")

</div>

Hi,  
I have taken reference of the blog post you shared to add Auth0 authentication to my app.

Nevertheless, I have been able to fix the issue. Seems like the https binding on the IIS was missing and the reason for the behavior.

Thanks!

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [July 14, 2022, 8:56pm UTC](https://community.auth0.com/t/getting-redirected-to-localhost-instead-of-the-website-hosted-on-localhost/86927/4 "2022-07-14T20:56:47Z")

</div>

Awesome, thanks for confirming and following up with the community! 😄

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 28, 2022, 12:28pm UTC](https://community.auth0.com/t/getting-redirected-to-localhost-instead-of-the-website-hosted-on-localhost/86927/5 "2022-07-28T12:28:46Z")

</div>


