GitHub Pagesのドメイン検証について
自分の個人アカウントあるいはOrganizationのカスタムドメインを検証すると、その検証されたカスタムドメインもしくはその直接のサブドメインにGitHub Pagesサイトを公開できるのは、自分の個人アカウントあるいはOrganizationが所有するリポジトリだけになります。
ドメインを検証すると、他のGitHubユーザがそのカスタムドメインを乗っ取り、そのユーザ自身のGitHub Pagesサイトの公開に使うことを止められます。 ドメインの乗っ取りは、GitHub Pages用にドメインを残したままで検証せず、あなたが自分のリポジトリを削除したとき、支払いプランをダウングレードしたとき、あるいはカスタムドメインのリンクを解除するその他の変更やGitHub Pagesを無効化した後に生じます。
ドメインを検証すると、直接のサブドメインもその検証に含まれます。 たとえば、github.com
というカスタムドメインが検証されると、docs.github.com
、support.github.com
あるいはその他の直接のサブドメインも、乗っ取りから保護されることになります。
OrganizationあるいはEnterpriseのドメインを検証することもできます。そうすると、「検証済み」バッジがOrganizationもしくはEnterpriseのプロフィールに表示され、GitHub Enterprise Cloudでは検証済みドメインを使ってメールアドレスへの通知を制限できるようになります。 詳しい情報については「Organizationのドメインの検証あるいは承認」及び「Enterpriseのドメインの検証あるいは承認」を参照してください。
ユーザサイトのドメインの検証
-
任意のページの右上で、プロフィール画像をクリックし、続いてSettings(設定)をクリックしてください。
-
サイドバーの"Code, planning, and automation(コード、計画、自動化)"のセクションで、 Pagesをクリックしてください。
-
On the right, click Add a domain.
-
Under "What domain would you like to add?", enter the domain you wish to verify and click Add domain.
-
Follow the instructions under "Add a DNS TXT record" to create the TXT record with your domain hosting service.
-
DNS設定が変更されるまで待ちます。これはすぐに行われることも、最大で24時間かかることもあります。 DNS設定への変更は、コマンドラインで
dig
コマンドを実行して確認できます。 以下のコマンドで、USERNAME
を自分のユーザ名に、example.com
を検証しているドメインに置き換えてください。 DNS設定が更新されていれば、出力中に新しいTXTレコードが表示されます。dig _github-pages-challenge-USERNAME.example.com +nostats +nocomments +nocmd TXT
-
After confirming that your DNS configuration has updated, you can verify the domain. If the change wasn't immediate, and you have navigated away from the previous page, return to your Pages settings by following the first few steps and, to the right of the domain, click and then click Continue verifying.
-
To verify your domain, click Verify.
-
To make sure your custom domain remains verified, keep the TXT record in your domain's DNS configuration.
Organizationのサイトのドメインの検証
Organizationのオーナーは、自分のOrganizatinのカスタムドメインを検証できます。
- In the top right corner of GitHub.com, click your profile photo, then click Your organizations.
- Organizationの隣のSettings(設定)をクリックしてください。
- サイドバーの"Code, planning, and automation(コード、計画、自動化)"のセクションで、 Pagesをクリックしてください。
- On the right, click Add a domain.
- Under "What domain would you like to add?", enter the domain you wish to verify and click Add domain.
- Follow the instructions under "Add a DNS TXT record" to create the TXT record with your domain hosting service.
- DNS設定が変更されるまで待ちます。これはすぐに行われることも、最大で24時間かかることもあります。 DNS設定への変更は、コマンドラインで
dig
コマンドを実行して確認できます。 以下のコマンドで、ORGANIZATION
を自分のOrganization名に、example.com
を検証しているドメインに置き換えてください。 DNS設定が更新されていれば、出力中に新しいTXTレコードが表示されます。dig _github-pages-challenge-ORGANIZATION.example.com +nostats +nocomments +nocmd TXT
- After confirming that your DNS configuration has updated, you can verify the domain. If the change wasn't immediate, and you have navigated away from the previous page, return to your Pages settings by following the first few steps and, to the right of the domain, click and then click Continue verifying.
- To verify your domain, click Verify.
- To make sure your custom domain remains verified, keep the TXT record in your domain's DNS configuration.