Verifying your custom domain for GitHub Pages

You can increase the security of your custom domain and avoid takeover attacks by verifying your domain.

GitHub Pagesは、GitHub Free及びOrganizationのGitHub Freeのパブリックリポジトリ、GitHub Pro、GitHub Team、GitHub Enterprise Cloud、GitHub Enterprise Serverのパブリック及びプライベートリポジトリで利用できます。 詳しい情報については「GitHubの製品」を参照してください。

About domain verification for GitHub Pages

When you verify your custom domain for your user account or organization, only repositories owned by your user account or organization may be used to publish a GitHub Pages site to the verified custom domain or the domain's immediate subdomains.

Verifying your domain stops other GitHub users from taking over your custom domain and using it to publish their own GitHub Pages site. Domain takeovers can happen when you delete your repository, when your billing plan is downgraded, or after any other change which unlinks the custom domain or disables GitHub Pages while the domain remains configured for GitHub Pages and is not verified.

When you verify a domain, any immediate subdomains are also included in the verification. For example, if the github.com custom domain is verified, docs.github.com, support.github.com, and any other immediate subdomains will also be protected from takeovers.

It's also possible to verify a domain for your organization, which displays a "Verified" badge on the organization profile. For more information, see "Verifying or approving a domain for your organization."

Verifying a domain for your user site

  1. 任意のページの右上で、プロフィール画像をクリックし、続いてSettings(設定)をクリックしてください。 ユーザバーの [Settings(設定)] アイコン
  2. 左のサイドバーでPages(ページ)をクリックしてください。 Pages option in the settings menu
  3. On the right, click Add a domain. Add domain button on Pages settings
  4. Under "What domain would you like to add?", enter the domain you wish to verify and click Add domain. Domain text field and Add domain button on Pages settings
  5. Follow the instructions under "Add a DNS TXT record" to create the TXT record with your domain hosting service. DNS TXT record information on Pages settings
  6. Wait for your DNS configuration to change, this may be immediate or take up to 24 hours. You can confirm the change to your DNS configuration by running the dig command on the command line. In the command below, replace USERNAME with your username and example.com with the domain you're verifying. If your DNS configuration has updated, you should see your new TXT record in the output.
    dig _github-pages-challenge-USERNAME.example.com +nostats +nocomments +nocmd TXT
    
  7. 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. Continue verifying option on Pages settings
  8. To verify your domain, click Verify. Verify button on Pages settings
  9. To make sure your custom domain remains verified, keep the TXT record in your domain's DNS configuration.

Verifying a domain for your organization site

Organization owners can verify custom domains for their organization.

  1. In the top right corner of GitHub.com, click your profile photo, then click Your organizations. プロフィールメニューのあなたのOrganization
  2. Organizationの隣のSettings(設定)をクリックしてください。 設定ボタン
  3. 左のサイドバーでPages(ページ)をクリックしてください。 Pages option in the settings menu
  4. On the right, click Add a domain. Add domain button on Pages settings
  5. Under "What domain would you like to add?", enter the domain you wish to verify and click Add domain. Domain text field and Add domain button on Pages settings
  6. Follow the instructions under "Add a DNS TXT record" to create the TXT record with your domain hosting service. DNS TXT record information on Pages settings
  7. Wait for your DNS configuration to change, this may be immediate or take up to 24 hours. You can confirm the change to your DNS configuration by running the dig command on the command line. In the command below, replace ORGANIZATION with the name of your organization and example.com with the domain you're verifying. If your DNS configuration has updated, you should see your new TXT record in the output.
    dig _github-pages-challenge-ORGANIZATION.example.com +nostats +nocomments +nocmd TXT
    
  8. 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. Continue verifying option on Pages settings
  9. To verify your domain, click Verify. Verify button on Pages settings
  10. To make sure your custom domain remains verified, keep the TXT record in your domain's DNS configuration.

このドキュメントは役立ちましたか?

プライバシーポリシー

これらのドキュメントを素晴らしいものにするのを手伝ってください!

GitHubのすべてのドキュメントはオープンソースです。間違っていたり、はっきりしないところがありましたか?Pull Requestをお送りください。

コントリビューションを行う

OR, コントリビューションの方法を学んでください。

問題がまだ解決していませんか?