How to Register a domain with PorkBun and use it to host your GitHub page

morgan batterham
4 min readMar 27, 2020

--

Our third assignment at Coder Academy is to build a basic portfolio website in a week and present it to the class. Seeing as I’ll (hopefully) be applying for developer jobs in the near future, I decided to commence making an actual portfolio website at morganbatterham.me. This guide shows the steps required to register the domain at porkbun.com and point that domain to your GitHubpage!

Step 1 — Register the domain

Head over to porkbun.com and type your requested domain into the search bar:

In this example my domain isn’t available — because I’ve already registered it!

I’ll choose morganbatterham.com for this example. Click the plus sign next to the domain of your choice. You can choose multiple domains if you wish!

Once you add the domain(s) to cart, click the cart icon in the top right corner to proceed:

Choose how long you want to register the domain. I chose two years. Then click continue in the bottom right to create an account:

Fill in all your details andd click create account at the bottom of the page:

Choose your payment method and complete the transaction. Be aware that the billing price is in US Dollars! PayPal is probably best for most people but I’m fortunate to have a Credit Card which doesn’t charge any foreign currency fees:

Once this payment processes you are now the proud owner of a new domain!

Step 2: Set up your github page

Create a new repo on GitHub. Use your GitHub username as the repo name:

Go to your webpage repo and click “settings” in the top right:

Scroll down to Github Pages. Select “master branch” as your source:

Under custom domain type your domain and click save:

One thing to note: This creates a file “CNAME” in your repo. Make sure you run “git pull” if you’re using an existing repo.

Step 3: Connect PorkBun to your GitHub page:

Back at porkbun.com click on your username and then domain management:

Alternatively navigate to https://porkbun.com/account/domains

Click on details next to your domain:

Next to “Quick Connect” click on Manage (note: in this example the word github is showing as I’ve already set it up):

Click the GitHub button:

Click “I Have One”:

You do have a GitHub account, right?

Click “Next Step”:

The linked guide merely runs you through what we did in Step 2 of this guide

Enter your GitHub username and click connect domain:

Success!

Step 4: Check if it works!

Wait 5–10 minutes for DNS propagation and check your domain to see if it works! While you wait, go back to your repo settings and check if the site is published:

All done!

--

--