Learn

Congrats — you’re the proud owner of a custom domain name!

You might notice, however, that your new domain name doesn’t work yet — you can’t visit it in your web browser. We have to connect it to your GitHub Pages website first.

There are two steps required:

  1. Inform GitHub of the new domain name we’ll be using (the one you purchased)
  2. Set up DNS records in Route 53 that direct to GitHub

Let’s start with the first step.

Instructions

  1. Open GitHub and access the repo you created earlier titled your-user-name.github.io.

  2. Click the “New file” button.

  3. Name the new file CNAME. Do not add a file name extension.

  4. In the file, on line 1, type the custom domain name you just purchased in the following format:

yourcustomdomain.com

You may have purchased a domain name with a TLD other than .com. In that case, make sure to use that TLD when creating the CNAME file.

5. Commit the new file.

6. Under the title of the repo, click on “Settings.” Scroll down to the section titled “GitHub Pages” and confirm that there is a message similar to the following:

Your site is published at http://yourcustomdomain.com.

7. Try navigating to your website in your browser using your new domain name. It still doesn’t work! Let’s finish setting it up in the next few exercises.

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?