# Wildcards for subdomain callbacks not working

**URL:** <https://community.auth0.com/t/wildcards-for-subdomain-callbacks-not-working/45187>\
**Category:** Get Help\
**Created:** [June 24, 2020, 4:59am UTC](https://community.auth0.com/t/wildcards-for-subdomain-callbacks-not-working/45187 "2020-06-24T04:59:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![benk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/benk/32/20621_2.png) [@benk](https://community.auth0.com/u/benk)\
**Post date:** [June 24, 2020, 4:59am UTC](https://community.auth0.com/t/wildcards-for-subdomain-callbacks-not-working/45187/1 "2020-06-24T04:59:07Z")

</div>

The guide [here](https://auth0.com/docs/applications/reference/wildcard-subdomains) mentions that \* based subdomain wildcards should be acceptable, however when implementing we receive errors for misaligned callbacks on login, and errors for the returnTo for logout. Adding the subdomain without wildcard however works fine in callbacks and logouts e.g. [https://foo.localhost:8080](https://foo.localhost:8080) works, changing to https://\*.localhost:8080 does not.

Is this a bug or an issue with our implementation?

---

<div class="post-metadata">

**Author:** ![markd](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markd/32/38919_2.png) [@markd](https://community.auth0.com/u/markd)\
**Post date:** [June 24, 2020, 1:05pm UTC](https://community.auth0.com/t/wildcards-for-subdomain-callbacks-not-working/45187/2 "2020-06-24T13:05:27Z")

</div>

Hi @benk,

Welcome to the Community. I suspect the `localhost` is treated like a top-level domain (`.com`, `.ca`, etc.) and `https://*.localhost:8080` therefore violates the second rule for wildcards:

> - The wildcard **must** be located in a subdomain within the hostname component. `https://*.com` will not work.

You might be able to confirm this if you try something like `https://*.foo.localhost:8080`.

---

<div class="post-metadata">

**Author:** ![benk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/benk/32/20621_2.png) [@benk](https://community.auth0.com/u/benk)\
**Post date:** [June 25, 2020, 10:23pm UTC](https://community.auth0.com/t/wildcards-for-subdomain-callbacks-not-working/45187/3 "2020-06-25T22:23:06Z")

</div>

Doh, of course! Thanks for your help @markd

---

<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:** [June 26, 2020, 6:49am UTC](https://community.auth0.com/t/wildcards-for-subdomain-callbacks-not-working/45187/4 "2020-06-26T06:49:13Z")

</div>

Glad you guys have figured it out!

---

<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:** [July 11, 2020, 6:49am UTC](https://community.auth0.com/t/wildcards-for-subdomain-callbacks-not-working/45187/5 "2020-07-11T06:49:14Z")

</div>

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