If your Page isn't loading at your custom domain, you may have an error in your CNAME setup.
The CNAME file isn't properly formatted
- The CNAME filename must be uppercase
- Only the bare domain or subdomain should be listed, e.g.,
Multiple domains in CNAME file
A CNAME file can contain only one domain. To point multiple domains to the same Page, set up redirects through your domain registrar or DNS host.
In order to serve the Page, your DNS must point to our server.
- If you are serving a top-level domain like
example.com, you should have an
ALIASrecord pointing to
username.github.io. If you cannot use an
ALIASrecord, you will need to create
Arecords that point to
- If you are using a subdomain, like
blog.mydomain.com, you should have a CNAME record pointing to
If you need help creating these records, contact your domain registrar or DNS host.
You can test that your DNS is pointing to our servers by using the
dig command on OSX and Linux:
dig example.com +nostats +nocomments +nocmd example.com. 3600 IN A 199.27.XX.XXX
You may see a different IP address, since we serve Pages with a global Content Delivery Network. Use
dig username.github.io to see the full resolution path. Note that DNS caching may cause a delay.
If you are using an
A record that points to
188.8.131.52, you will need to update your DNS settings, as we no longer serve Pages directly from those servers.
For more information, see Setting up a custom domain.
URL formatting error on Linux
Warning: If the URL for your Pages site contains a username or organization name that begins or ends in a dash, or contains consecutive dashes, then people browsing with Linux will receive a server error when they visit the site. To fix this, change your GitHub username to remove non-alphanumeric characters. For instructions on how to do this, see "Changing your GitHub username."
CNAME already taken
If the custom domain in your CNAME file is being used by another GitHub Pages site, you will receive a page build warning.
If you have an an apex domain such as
example.com in your CNAME file, this means that either
example.com or its
www subdomain (
www.example.com) has been used in a CNAME file in another repository and is being used by the corresponding GitHub Pages site.
If you have a
www subdomain such as
www.example.com in your CNAME file, this means that either
www.example.com or its apex domain (
example.com) has been used in a CNAME file in another repository and is being used by the corresponding GitHub Pages site.
To use your custom domain, whether you're setting up an apex domain or a subdomain, you need to remove the CNAME file from the other repository in which it's used. After you have done this, you will also need to push again to trigger a new page build.
If you don't own the other repository containing the CNAME file where your custom domain is in use, you should try to contact the owner of the other repository and ask them to remove the CNAME file. If you don't know which other repository contains the CNAME file where your custom domain is in use, you can contact GitHub support for help.