Skip to content

Instantly share code, notes, and snippets.

@mjamesd
Last active February 4, 2022 06:02
Show Gist options
  • Save mjamesd/43a1702fa9df0ab58a0d1e2a6df5f9df to your computer and use it in GitHub Desktop.
Save mjamesd/43a1702fa9df0ab58a0d1e2a6df5f9df to your computer and use it in GitHub Desktop.
Custom Domains with GitHub Pages & Heroku

Custom Domains with GitHub Pages & Heroku

Summary

For just a few dollars, you can purchase your own domain name for 1 year from a domain registrar. These companies register your domain name with ICANN and add it to the global network of Domain Name Service (DNS) servers. These servers match IP addresses to domain names, so that when a user types your domain name into their browser, they are automagically connected to your domain's IP address.

Many domain registrars also offer web hosting... for a monthly or yearly fee. These fees can be a barrier to entry into markets. If you don't have very much traffic on your site (i.e., you're just starting your company, you are a hobbyist, you are a developer) you can use free hosting sites and then point your domain's DNS records to these sites. In this tutorial, I'll be explaining how to set up GitHub Pages and Heroku with your domain's DNS so that you can quickly host your website and your customers/audience can reach you.

Table of Contents

  1. Configuring Your Domain's DNS
  2. Configure GitHub Pages
  3. Configure Heroku

Your Domain's DNS

First you have to make your website! Then you need to settle on a domain registrar and a domain name. I have used a few in the past, but currently I am using NameCheap for no particular reason, so I'll be using this in this registrar for this tutorial.

GitHub Pages

Heroku

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment