Skip to main content

About custom domains and GitHub Pages

Páginas de GitHub supports using custom domains, or changing the root of your site's URL from the default, like octocat.github.io, to any domain you own.

Páginas de GitHub se encuentra disponible en los repositorios públicos con GitHub Free y con GitHub Free para las organizaciones, y en los repositorios públicos y privados con GitHub Pro, GitHub Team, Nube de GitHub Enterprise, y GitHub Enterprise Server. Para obtener más información, consulta la sección "Productos de GitHub".

Supported custom domains

Páginas de GitHub works with two types of domains: subdomains and apex domains. For a list of unsupported custom domains, see "Troubleshooting custom domains and Páginas de GitHub."

Supported custom domain typeExample
www subdomainwww.example.com
Custom subdomainblog.example.com
Apex domainexample.com

You can set up either or both of apex and www subdomain configurations for your site. For more information on apex domains, see "Using an apex domain for your Páginas de GitHub site."

We recommend always using a www subdomain, even if you also use an apex domain. When you create a new site with an apex domain, we automatically attempt to secure the www subdomain for use when serving your site's content, but you need to make the DNS changes to use the www subdomain. If you configure a www subdomain, we automatically attempt to secure the associated apex domain. For more information, see "Managing a custom domain for your Páginas de GitHub site."

After you configure a custom domain for a user or organization site, the custom domain will replace the <user>.github.io or <organization>.github.io portion of the URL for any project sites owned by the account that do not have a custom domain configured. For example, if the custom domain for your user site is www.octocat.com, and you have a project site with no custom domain configured that is published from a repository called octo-project, the Páginas de GitHub site for that repository will be available at www.octocat.com/octo-project.

Using a subdomain for your Páginas de GitHub site

A subdomain is the part of a URL before the root domain. You can configure your subdomain as www or as a distinct section of your site, like blog.example.com.

Subdomains are configured with a CNAME record through your DNS provider. For more information, see "Managing a custom domain for your Páginas de GitHub site."

www subdomains

A www subdomain is the most commonly used type of subdomain. For example, www.example.com includes a www subdomain.

www subdomains are the most stable type of custom domain because www subdomains are not affected by changes to the IP addresses of GitHub's servers.

Custom subdomains

A custom subdomain is a type of subdomain that doesn't use the standard www variant. Custom subdomains are mostly used when you want two distinct sections of your site. For example, you can create a site called blog.example.com and customize that section independently from www.example.com.

Using an apex domain for your Páginas de GitHub site

An apex domain is a custom domain that does not contain a subdomain, such as example.com. Apex domains are also known as base, bare, naked, root apex, or zone apex domains.

An apex domain is configured with an A, ALIAS, or ANAME record through your DNS provider. For more information, see "Managing a custom domain for your Páginas de GitHub site."

Si estás utilizando un dominio apex como tu dominio personalizado, te recomendamos configurar un subdominio www. Si configuras los registros correctos para cada dominio, teclea a tu proveedor de DNS, Páginas de GitHub creará automáticamente redireccionamientos entre los dominios. Por ejemplo, sin configuras www.example.com como el dominio personalizado de tu sitio y tienes configurados los dominios de DNS de Páginas de GitHub para los dominios de apex y www, entonces, example.com te redirigirá a www.example.com. Nota que las redirecciones automáticas solo aplican al subdominio www. Las redirecciones automáticas no aplican a ningún otro subdominio, tal como blog. For more information, see "Managing a custom domain for your Páginas de GitHub site."

Securing the custom domain for your Páginas de GitHub site

Si se inhabilita tu sitio de Páginas de GitHub pero este tiene configurado un dominio personalizado, está en riesgo de que lo tomen. La configuración de tu dominio personalizado con tu proveedor DNS mientras tu sitio está inhabilitado, podría hacer que alguien más aloje un sitio en un o de tus subdominios.

El verificar tu dominio personalizado previene que otros usuarios de GitHub lo utilicen con sus repositorios. Si tu dominio no está verificado y tu sitio de Páginas de GitHub está inhabilitado, deberías actualizar o eliminar tus registros de DNS inmediatamente con tu proveedor de DNS. For more information, see "Verifying your custom domain for Páginas de GitHub" and "Managing a custom domain for your Páginas de GitHub site."

There are a couple of reasons your site might be automatically disabled.

  • If you downgrade from GitHub Pro to GitHub Free, any Páginas de GitHub sites that are currently published from private repositories in your account will be unpublished. For more information, see "Downgrading your GitHub billing plan."
  • If you transfer a private repository to a personal account that is using GitHub Free, the repository will lose access to the Páginas de GitHub feature, and the currently published Páginas de GitHub site will be unpublished. For more information, see "Transferring a repository."

Further reading