{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":423,"path":"api-reference/rest-api-explorer/r_CORSDomainRequirements.md","title":"CORS domain requirements","bundle":null,"doc_type":null,"release":"australia","body":"\n# CORS domain requirements\n\nWhen you define a cross-origin resource sharing \\(CORS\\) rule, the value you enter in the **Domain** field must meet certain requirements. Each CORS rule supports a single wildcard to match incoming Origin headers.\n\n## Requirements\n\nThe value you enter in the **Domain** field must meet the following requirements.\n\n-   Begins with `HTTP://` or `HTTPS://`.\n-   Is a domain pattern or IP address.\n-   Ends with alphanumeric characters preceded by a period, such as `.com`.\n-   Includes at most a single wildcard character immediately following the scheme and hierarchical portion of the domain pattern.\n\n## Wildcard\n\nYou can use a single wildcard character \\(\\*\\) in the domain pattern. Use this wildcard immediately following the scheme and hierarchical portion of the domain pattern, such as `http://*.domain.com` to include all subdomains. The wildcard must immediately follow the scheme and hierarchical portion of the domain pattern. If you use an IP address instead of domain pattern, you must enter the full IP address without a wildcard.\n\n**Note:** You cannot use multiple wildcards, or specify a wildcard without a domain pattern. Values such as \\* or \\*.\\* are not supported.\n\n## Domain matching\n\nWhen evaluating the Origin header in a request, ServiceNow prioritizes rules that match the domain pattern exactly. If no exact match is found, the next closest match is used.\n\nFor example, if there are rules for the domain patterns `http://*.blog.mysite.com` and `http://*.mysite.com`, a request from `http://alice.blog.mysite.com` will match the `http://*.blog.mysite.com` pattern.\n\n## Examples of valid and invalid domains\n\n|Valid domain|Invalid domain|\n|------------|--------------|\n|`http://*.ms.net`|`https://*com`|\n|`https://*.ms.com`|`http://*..com`|\n|`https://*.com.au`|`http://192.168.1.*`|\n|`http://192.168.1.1`|`http://*.168.1.126`|\n|`http://*.service-now.com`|`http://blog.*.service-now.com`|\n|`http://*.com`|`http://*com`|\n\n**Parent Topic:**[REST APIs](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md)\n\n"}}