What Pork Bun and GitHub do together

Pork Bun is a domain registrar where you buy and manage your domain name. GitHub Pages is a hosting service that turns a GitHub repository into a live website. To connect them, you point your Pork Bun domain to GitHub's servers so that when someone types your domain name, they land on your GitHub-hosted site instead of a blank page.

The connection happens through DNS records — instructions that tell the internet where your domain should point. You do not move your domain away from Pork Bun. Instead, you add or change a few DNS settings inside your Pork Bun account to redirect traffic to GitHub.

This process takes about 15 minutes to set up, though DNS changes can take up to 48 hours to fully propagate across the internet. Most of the time you will see your site live within a few hours.

Key Takeaways

  • You need a GitHub repository with a site already built (HTML files or a static site generator like Jekyll), and that repository must be set to publish as GitHub Pages.
  • In your Pork Bun account, you will add four A records and one CNAME record that point to GitHub's servers.
  • GitHub will also ask you to add a TXT record to prove you own the domain, which takes one extra step but prevents someone else from claiming it.
  • After you save the DNS changes in Pork Bun, wait a few hours and then check that your domain loads your GitHub site — do not assume it worked when ready.

Set up your GitHub repository first

Before you touch Pork Bun's settings, your GitHub repository must already be configured to publish as GitHub Pages. Log into GitHub, open the repository you want to publish, and go to Settings (the gear icon in the top right of the repository page).

Scroll down to the section called "GitHub Pages" or "Pages" (the exact name changed in recent updates). Under "Build and deployment", make sure the source is set to "Deploy from a branch" and the branch is set to "main" (or "master" if your repository uses that). If you have a folder called "docs" that contains your site files, you can also choose to deploy from the "docs" folder instead of the root. Save these settings.

GitHub will now show you a message that says your site is published at something like yourusername.github.io/repository-name. This is your temporary GitHub address. Your site is already live at this address — you are just about to point your Pork Bun domain to it.

Find GitHub's DNS addresses

GitHub publishes the exact IP addresses and CNAME record you need to add to your DNS. Go to the GitHub documentation page "Configuring a custom domain for your GitHub Pages site" (search for that exact phrase in GitHub's help center, or visit docs.github.com and search for "custom domain"). The page lists four IP addresses that you will need to copy.

As of now, those four addresses are 185.199.108.153, 185.199.109.153, 185.199.110.153, and 185.199.111.153, but GitHub updates these occasionally. Always copy them from the official documentation page rather than from any other source, including this article.

The same documentation page also tells you the CNAME record you need: it will be yourusername.github.io (replace "yourusername" with your actual GitHub username).

Add DNS records in Pork Bun

Log into your Pork Bun account and go to your domain management page. Find the domain you want to connect and click on it. Look for a button or link that says "Manage" or "DNS" — Pork Bun calls this section "DNS Settings".

You will see a list of existing DNS records. You need to add four A records and one CNAME record. Click the button to add a new record.

For each of the four IP addresses GitHub gave you, create an A record. In the "Name" or "Subdomain" field, leave it blank or enter @ (both mean the root domain). In the "Type" field, select "A". In the "Value" or "Data" field, paste the first IP address. Set the TTL (time to live) to 3600 or leave it at the default. Save this record, then repeat for the other three IP addresses.

Next, add one CNAME record. In the "Name" field, enter www. In the "Type" field, select "CNAME". In the "Value" field, enter yourusername.github.io (your actual GitHub username). Save this record.

Verify domain ownership with GitHub

Go back to your GitHub repository settings and scroll to the GitHub Pages section again. You will see a field that says "Custom domain". Enter your Pork Bun domain name (for example, example.com) and click Save.

GitHub will now ask you to verify that you own this domain. It will show you a TXT record to add to your Pork Bun DNS settings. Copy that record exactly. Go back to Pork Bun, add a new DNS record with Type "TXT", paste the value GitHub gave you, and save it.

Return to GitHub and click the "Verify" button. GitHub will check your DNS records and confirm ownership. This usually takes a few minutes but can take up to an hour.

Wait for DNS to propagate and test

After you save all your DNS records in Pork Bun, the changes do not take effect when ready. DNS propagation — the process of those changes spreading across the internet — can take anywhere from a few minutes to 48 hours, though it is usually much faster.

After about 30 minutes, open a new browser window (or clear your browser cache) and type your domain name into the address bar. If you see your GitHub Pages site load, the connection worked. If you see an error or a blank page, wait another hour and try again. Do not assume something is wrong until at least a few hours have passed.

You can also check the status of your DNS records using a free tool like MXToolbox or DNS Checker. Search for "DNS propagation checker", enter your domain name, and it will show you whether the A records and CNAME record are pointing to the right places.

Enable HTTPS for your custom domain

Once your domain is pointing to GitHub and your site loads, go back to your GitHub repository settings and scroll to the GitHub Pages section. You should now see a checkbox that says "Enforce HTTPS". Check this box. This encrypts traffic between your visitors and GitHub's servers and is strongly recommended for any live website.

GitHub provides this HTTPS certificate for free through Let's Encrypt. After you check the box, it may take a few minutes for the certificate to be issued, but you do not have to do anything else.

Frequently Asked Questions

What if my domain still shows an error after 24 hours?

Check that all four A records are added correctly in Pork Bun — a single wrong digit will break the connection. Use a DNS checker tool to see what your domain is actually pointing to. If the records look wrong, delete them and add them again, copying directly from GitHub's documentation. If the records look correct but your site still does not load, contact Pork Bun support to confirm your DNS settings are saved.

Do I have to use www with my domain?

No. The four A records you added point your root domain (example.com) to GitHub. The CNAME record you added points www.example.com to GitHub. Both will work. If you want to redirect one to the other automatically, you can set that up in your GitHub repository settings under "Custom domain".

Can I use a subdomain instead of my main domain?

Yes. Instead of pointing example.com, you can point blog.example.com or any other subdomain. In Pork Bun, add the A records with "blog" in the Name field instead of leaving it blank. Add a CNAME record with "blog" as the Name field pointing to yourusername.github.io. Then enter blog.example.com in GitHub's custom domain field.

What happens if I delete my GitHub repository?

Your domain will stop working and visitors will see an error. Your Pork Bun domain itself is not affected — you still own it. If you want to use the domain again, you can point it to a different GitHub repository or a different hosting service by changing the DNS records.

Do I need to renew anything after I connect them?

No. Your Pork Bun domain registration renews on its own schedule (usually yearly) based on what you paid for. Your GitHub Pages hosting is free and does not expire. Once the DNS records are set, they stay in place unless you change them.