<p>You need to put in place a custom Azure B2C policy to block access to the original domain</p>
<p><a href="https://learn.microsoft.com/en-us/azure/active-directory-b2c/custom-domain?pivots=b2c-custom-policy#optional-block-access-to-the-default-domain-name" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/active-directory-b2c/custom-domain?pivots=b2c-custom-policy#optional-block-access-to-the-default-domain-name</a></p>

CC BY-SA 4.0
2023-12-29T09:22:11.813Z
2023-12-29T09:22:11.813Z
Finlay Carmichael
<p>I have created an Azure B2C and we have a few user flows. These user flows use the default domain of <code>b2cinstance.b2clogin.com</code>. This domain doesn't go through a WAF so I decided to create an Azure Front Door with WAF Policy to set up a custom domain for my Azure B2C instance.</p>
<p>I have set this all up and it is working as expected. We now have the domain <code>login.mywebsite.com</code>, which forwards to origin <code>b2cinstance.b2clogin.com</code>. for our user flows which is working as expected and can see the requests in the Azure Front Door.</p>
<p>My question if I try to use the domain <code>b2cinstance.b2clogin.com</code>, the user flow still works. How do I restrict use of this domain</p>

<azure>
Azure B2C - Restrict access for default domain after creating custom domain
Ross
# Azure B2C - Restrict access for default domain after creating custom domain

(Asked by: username_0 on 2023-12-07)

I have created an Azure B2C and we have a few user flows. These user flows use the default domain of `b2cinstance.b2clogin.com`. This domain doesn't go through a WAF so I decided to create an Azure Front Door with WAF Policy to set up a custom domain for my Azure B2C instance.

I have set this all up and it is working as expected. We now have the domain `login.mywebsite.com`, which forwards to origin `b2cinstance.b2clogin.com`. for our user flows which is working as expected and can see the requests in the Azure Front Door.

My question if I try to use the domain `b2cinstance.b2clogin.com`, the user flow still works. How do I restrict use of this domain

**Tags:** azure


---

## 1 answers

### Answer by username_1 on 2023-12-29. Score: 0

You need to put in place a custom Azure B2C policy to block access to the original domain

<https://learn.microsoft.com/en-us/azure/active-directory-b2c/custom-domain?pivots=b2c-custom-policy#optional-block-access-to-the-default-domain-name>


---

