When setting up a website, it’s also conventional to also set up a www subdomain. www stands for world wide web.

Subdomains are part of a main (or root) domain. For example, www.yourcustomdomain.com is a subdomain of the yourcustomdomain.com root domain.

We can set up a subdomain using a CNAME record, which stands for Canonical Name.

A CNAME record specifies that a domain name will be used as an alias, or substitute, for the true (canonical) domain name.


1. Inside of your Hosted Zone, click on the button at the top labeled “Create Record Set”.

A form will appear to the right. In the “Name:” field, enter only www. Set the “Type: “ field to CNAME - Canonical name. This step sets up the subdomain.

2. In the Value text box, enter the domain name that GitHub assigned to you earlier (the canonical domain name:


3. Click the “Save Record Set” button at the bottom of the form.

Sign up to start coding

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?