# Disable sign-in and register pages for custom domain

**URL:** <https://devforum.okta.com/t/disable-sign-in-and-register-pages-for-custom-domain/12536>\
**Category:** Questions\
**Created:** [January 18, 2021, 11:28am UTC](https://devforum.okta.com/t/disable-sign-in-and-register-pages-for-custom-domain/12536 "2021-01-18T11:28:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lonli-Lokli](https://avatars.discourse-cdn.com/v4/letter/l/848f3c/32.png) [@Lonli-Lokli](https://devforum.okta.com/u/Lonli-Lokli)\
**Post date:** [January 18, 2021, 11:28am UTC](https://devforum.okta.com/t/disable-sign-in-and-register-pages-for-custom-domain/12536/1 "2021-01-18T11:28:38Z")

</div>

We are using Okta as a Identity Provider, eg only OAuth2 with PKCE, and using custom domain feature, ie okta is serving over [id.company.com](http://id.company.com)  
Unfortunately we still see all custom pages on [id.company.com](http://id.company.com) (sign-in page), as well as other custom (register, 404).  
How can we disable them? We would like to make our own registration pages via API call to okta

---

<div class="post-metadata">

**Author:** ![rajnadimpalli](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@rajnadimpalli](https://devforum.okta.com/u/rajnadimpalli)\
**Post date:** [January 19, 2021, 10:32am UTC](https://devforum.okta.com/t/disable-sign-in-and-register-pages-for-custom-domain/12536/2 "2021-01-19T10:32:25Z")

</div>

Hi @Lonli-Lokli,

**Sign in page** :  
If you are using custom domain, you can update sign in widget to include following javascript in the body. You can do the same on Okta error page as well.

As an admin if you need to login, you can use the default Okta URL ([example.okta.com](http://example.okta.com)) to login.

**Registration page** :  
You can disable registration : [https://help.okta.com/en/prod/Content/Topics/users-groups-profiles/usgp-self-service-registration.htm](https://help.okta.com/en/prod/Content/Topics/users-groups-profiles/usgp-self-service-registration.htm)

Other options to look at:

> **[Configure a default app for the sign-in widget](https://help.okta.com/en/prod/Content/Topics/Settings/settings-redirect-to-custom-page.htm)**

Thank you,  
Raj

---

<div class="post-metadata">

**Author:** ![Lonli-Lokli](https://avatars.discourse-cdn.com/v4/letter/l/848f3c/32.png) [@Lonli-Lokli](https://devforum.okta.com/u/Lonli-Lokli)\
**Post date:** [February 17, 2021, 11:29pm UTC](https://devforum.okta.com/t/disable-sign-in-and-register-pages-for-custom-domain/12536/3 "2021-02-17T23:29:28Z")

</div>

@rajnadimpalli what javascript should I include?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 23, 2021, 5:34pm UTC](https://devforum.okta.com/t/disable-sign-in-and-register-pages-for-custom-domain/12536/4 "2021-02-23T17:34:48Z")

</div>

If you’re just trying to turn off Self-Service Registration, you will want to update your Custom Sign In page as follows:

```
 <script type="text/javascript">

// "config" object contains default widget configuration
// with any custom overrides defined in your admin settings.
var config = OktaUtil.getSignInWidgetConfig();

// Add the below line
config['features.registration'] = false;

// Render the Okta Sign-In Widget
var oktaSignIn = new OktaSignIn(config);
oktaSignIn.renderEl({ el: '#okta-login-container' },
    OktaUtil.completeLogin,
    function(error) {
        // Logs errors that occur when configuring the widget.
        // Remove or replace this with your own custom error handler.
        console.log(error.message, error);
    }
);

```

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 8, 2024, 9:15pm UTC](https://devforum.okta.com/t/disable-sign-in-and-register-pages-for-custom-domain/12536/5 "2024-02-08T21:15:23Z")

</div>


