Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains.
HTTP request
POST https://appengine.googleapis.com/v1/{parent=apps/*}/domainMappings
Override strategy for mutating an existing mapping.
Enums
UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY
Strategy unspecified. Defaults to STRICT.
STRICT
Overrides not allowed. If a mapping already exists for the specified domain, the request will return an ALREADY_EXISTS (409).
OVERRIDE
Overrides allowed. If a mapping already exists for the specified domain, the request will overwrite it. Note that this might stop another Google product from serving. For example, if the domain is mapped to another App Engine application, that app will no longer serve from that domain.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[[["\u003cp\u003eThis page details how to map a domain to an application using the App Engine Admin API, requiring admin authorization.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request method is \u003ccode\u003ePOST\u003c/code\u003e to \u003ccode\u003ehttps://appengine.googleapis.com/v1/{parent=apps/*}/domainMappings\u003c/code\u003e, following gRPC Transcoding syntax.\u003c/p\u003e\n"],["\u003cp\u003eThe required \u003ccode\u003eparent\u003c/code\u003e path parameter specifies the application, with a required IAM permission \u003ccode\u003eappengine.applications.update\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eoverrideStrategy\u003c/code\u003e query parameter determines if existing domain mappings can be overwritten, with \u003ccode\u003eSTRICT\u003c/code\u003e as the default to prevent overwrites.\u003c/p\u003e\n"],["\u003cp\u003eA successful request returns a newly created \u003ccode\u003eOperation\u003c/code\u003e instance, and authorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: apps.domainMappings.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization Scopes](#body.aspect)\n- [DomainOverrideStrategy](#DomainOverrideStrategy)\n- [Try it!](#try-it)\n\nMaps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see [`AuthorizedDomains.ListAuthorizedDomains`]().\n\n### HTTP request\n\n`POST https://appengine.googleapis.com/v1/{parent=apps/*}/domainMappings`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body contains an instance of [DomainMapping](/appengine/docs/admin-api/reference/rest/v1/apps.domainMappings#DomainMapping).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Operation](/appengine/docs/admin-api/reference/rest/Shared.Types/ListOperationsResponse#Operation).\n\n### Authorization Scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).\n\nDomainOverrideStrategy\n----------------------\n\nOverride strategy for mutating an existing mapping."]]