You can set up an apex domain and a www subdomain through your DNS provider and GitHub Pages' servers will automatically create redirects between them. For example, your site can be found at www.example.com or example.com.
If you want an apex domain to work with a www subdomain, such as example.com and www.example.com, then you must configure each domain through your DNS provider and GitHub Pages' servers will automatically create redirects for you. For example:
- If your
CNAMEfile containsexample.com, thenwww.example.comwill redirect toexample.com - If your
CNAMEfile containswww.example.com, thenexample.comwill redirect towww.example.com.
Setting up an apex domain
To set up an apex domain, such as example.com, you must configure an ALIAS, ANAME, or A record with your DNS provider.
Setting up a www subdomain
To set up a www subdomain, such as www.example.com you must configure a CNAME record with your DNS provider.

