Google App Engineを使用したアプリケーションを作成する場合、アプリは自動的にyour-app-ID.appspot.com
のappspot.com
ドメイン上で提供されます。
しかし、アプリケーションをあなたが所有するカスタムドメイン(example.com
)や、そのドメインの特定のサブドメイン(app.example.com
)や、
そのサブドメインの任意もしくは全てのサブドメイン(*.example.com
)で提供するのが
望ましいことがしばしばあります。
App Engineでこれを行うのは簡単です。もちろん、まずはドメイン登録業者(ドメインレジストラ)を通じてドメインを取得しなければなりません。 ドメインを取得したら、アプリをカスタマイズしてドメインやサブドメインを使えるようにするために3ステップが必要です。:
全ての処理は、通常はあなたのコンピュータで数分で完了できます。
このページの説明は、通常のHTTP接続を使いなおかつGoogle Appsを通じて提供されていないApp Engineアプリに対してのものなので注意してください。 Here are some related procedures that require different instructions:
使用するドメインの準備できていない場合は、ドメイン登録業者から一つ購入してください。 ("ドメイン登録業者"で検索すると何社か出てきます。) それから、あなたのアプリケーションをドメインに関連付けるには以下のボタンをクリックしてください。
次のページでは、あなたがドメインの所有権であることを確認する必要があります。.
それから、App Engineアプリを提供するのに使用したいドメインを選んでください。
最後に、開発者コンソールで一覧表示された A
, AAAA
, CNAME
レコードをあなたのドメイン登録業者に追加します。
ドメインレコードの更新はインターネット上に伝播するまでに時間がかかり、ユーザーごとに伝わる時間が異なります。
この処理は最大で二日かかりますが、ほとんどのユーザーの場合はそれよりも速く伝わります。
ドメイン登録業者がそうした変更を実装しているか確認したい場合は、 dig
やnslookup
のようなDNS ツールを使用できます。
あなたのドメインがホワイトリストに登録されていなければ、Strict-Transport-Security ヘッダを使用することができません。 あなたのドメインをホワイトリストに登録するには、agl@chromium.orgへ連絡してください。
カスタムドメインにワイルドカードサブドメインマッピングを設定している場合、あなたのアプリケーションは合致する全てのサブドメインへ対するリクエストを処理します。
If the user browses a domain that matches an application version name or module name, the application serves that version.
If the user browses a domain that matches a module name, the application serves that module.
例えば、あなたがワイルドカードサブドメイン *.wild.example.com
を設定したとします。
Your application has two versions, the default version and one named beta
, and a module named be
with just one module instance running.
whatever.wild.example.com
ではアプリケーションが提供されます。beta.wild.example.com
ではアプリケーションの ベータ
版が提供されます。alpha.beta.wild.example.com
でも アプリケーションの ベータ
版が提供されます。be.wild.example.com
では be
モジュールが提供されます。0.be.wild.example.com
では be
モジュールの0インスタンスが提供されます。something.0.be.wild.example.com
でも be
モジュールの0インスタンスが提供されます。1.be.wild.example.com
serves an error message, but if the be
module was provisioned with more than one instance, then this would serve the first (after zeroth) instance.You can use wildcards to map subdomains at any level, starting at third-level subdomains. For example, if your domain is example.com
and you enter text in the web address field:
*
と入力すると、あなたのアプリのexample.com
の全てのサブドメインに紐付けられます。
*.private
と入力すると、あなたのアプリのprivate.example.com
の全てのサブドメインに紐付けられます。
*.nichol.sharks.nhl
と入力すると、あなたのアプリのnichol.sharks.nhl.example.com
の全てのサブドメインに紐付けられます。
*.excogitate.system
と入力すると、あなたのアプリのexcogitate.system.example.com
の全てのサブドメインに紐付けられます。
If you use Google Apps with other subdomains on your domain, such as sites
and mail
, those mappings have higher priority and are matched first, before any wildcard mapping takes place.
In addition, if you have other App Engine apps mapped to other subdomains, those mappings also have higher priority than any wildcard mapping.
いくつかのDNSプロバイダではワイルドカードサブドメインの紐付けが動作しないことがあるので注意してください。 In particular, a DNS provider must permit wildcards in CNAME host entries.