Subdomain isolation mitigates cross-site scripting and other related vulnerabilities. For more information, see "Cross-site scripting" on Wikipedia. We highly recommend that you enable subdomain isolation on your GitHub Enterprise Server instance.
When subdomain isolation is enabled, GitHub Enterprise Server replaces several paths with subdomains.
To use Docker with GitHub Packages, you must also enable subdomain isolation. For more information, see "Configuring Docker for use with GitHub Packages."
Note: GitHub Packages is currently in beta for GitHub Enterprise Server 2.22. To join the beta for your GitHub Enterprise Server instance, use the sign-up form.
|Path without subdomain isolation||Path with subdomain isolation|
|N/A, Docker with GitHub Packages will not work with subdomain isolation disabled for the GitHub Packages 2.22 beta.|
Warning: If subdomain isolation is disabled, we recommend also disabling GitHub Pages on your enterprise. There will be no way to isolate user-supplied GitHub Pages content from the rest of your enterprise's data. For more information, see "Configuring GitHub Pages for your enterprise."
Before you enable subdomain isolation, you must configure your network settings for your new domain.
- Specify a valid domain name as your hostname, instead of an IP address. For more information, see "Configuring a hostname."
Warning: Do not change the hostname for GitHub Enterprise Server after initial setup. Changing the hostname will cause unexpected behavior, up to and including instance outages.
- Set up a wildcard Domain Name System (DNS) record or individual DNS records for the subdomains listed above. We recommend creating an A record for
*.HOSTNAMEthat points to your server's IP address so you don't have to create multiple records for each subdomain.
- Get a wildcard Transport Layer Security (TLS) certificate for
*.HOSTNAMEwith a Subject Alternative Name (SAN) for both
HOSTNAMEand the wildcard domain
*.HOSTNAME. For example, if your hostname is
github.octoinc.com, get a certificate with the Common Name value set to
*.github.octoinc.comand a SAN value set to both
- Enable TLS on your appliance. For more information, see "Configuring TLS."
- From an administrative account on GitHub Enterprise Server, click in the upper-right corner of any page.
- In the left sidebar, click Management Console.
- In the left sidebar, click Hostname.
- Select Subdomain isolation (recommended).
- Under the left sidebar, click Save settings.
- Wait for the configuration run to complete.