Okta Custom Domain Configuration Error: "domain: The specified domain name is in an invalid format"
Last Updated:
Overview
Configuring an Okta custom domain fails with an invalid format error when the domain string includes unnecessary characters, such as a protocol prefix or leading spaces. Removing these extra characters and entering only the domain or subdomain resolves the issue. When configuring a custom domain under a brand, Okta generates the following error:
domain: The specified domain name is in an invalid format. Valid format examples are example.com or portal.example.com
Review the following image for an example of the invalid format error message.
Applies To
- Okta Identity Engine (OIE)
- Okta Classic Engine
- Customizations
- Brands
- Custom Domain
Cause
The domain format contains invalid characters. Entering a protocol prefix like https:// or including a leading space before the domain name triggers this error.
Review the following image for an example of an incorrectly formatted domain entry containing a leading space.
Solution
How is the custom domain format error resolved?
Enter the exact domain or subdomain without any additional characters, protocol prefixes, or spaces. For example, use custom.com or subdomain.custom.com instead of https://custom.com or custom.com.
