Adding or removing a custom domain for your GitHub Pages site

Before setting up or modifying your custom domain with your DNS provider, you should add or remove the custom domain on GitHub.

GitHub Pages is available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see "GitHub's products."

In this article

Updating custom domains when your GitHub Pages site is disabled

There are a couple of reasons your GitHub Pages site might be automatically disabled:

If your GitHub Pages site has a custom domain set up and is disabled, you should immediately update or remove your DNS records with your DNS provider to avoid the risk of a domain takeover. Configuring your custom domain with your DNS provider while your GitHub Pages site is disabled could result in someone else hosting a site on one of your subdomains. For more information, see "Using a custom domain with GitHub Pages."

Adding or removing a custom domain

For more information, see "Quick start: Setting up a custom domain."

  1. On GitHub, navigate to your GitHub Pages site's repository.

  2. Under your repository name, click Settings.

    Repository settings button

  3. Under "Custom domain," add or remove your custom domain and click Save. To check if your custom domain is supported, see "About supported custom domains."

  4. If you added a custom domain you can optionally enforce HTTPS for your site. For more information, see "Securing your GitHub Pages site with HTTPS."

Further reading

Ask a human

Can't find what you're looking for?

Contact us