What is a Subdomain?
Watch this video to learn more about Subdomain and how to use them.
By: Eli the Computer Guy [Another video](https://www.youtube.com/watch?v=-pJq3XZQbt0)


đź’ˇ Note: It is important to mention that the subdomain can link to a completely different website.
To link another site just add the DNS records from the host to the new subdomain.


In this article, you will learn how to connect your projects hosted on GitHub Pages or Vercel to a custom sub-domain in Porkbun.

How to Add and Configure a SubDomain on Porkbun and Vercel

url components

Prerequisites

Step by Step in Vercel

  1. Go to Vercel and login.
  2. Open the project you want to link.
  3. Click on Domains.
  4. Type the subdomain that you previously configured and click the “Add” button.
  5. Use the information from Vercel to link your domain in Porkbun.

Step by Step in Porkbun

  1. Go to Porkbun and login.
  2. Click on “Account” button > “Domain Managment” button.
  3. Locate your domain and click the “Details” button > “edit” option next to “DNS Records”.
  4. Add the subdomain in the host field (ex: if url is doc.jpdiaz.dev, add “doc” for the host).
  5. Add a “cname.vercel-dns.com.” in the answer field.
  6. Click Add.

    Check the Porkbun documentation for more details.


Adding and Configuring a Subdomain on Porkbun and GitHub Pages

Prerequisites

Step by Step in GitHub Pages

  1. Go to GitHub and login.
  2. Open the repository you want to link.
  3. Click on the “settings” button > “pages”.
  4. Under “Custom domain”, type the subdomain and click the “save” button.
  5. Use the information from Vercel to link your domain in Porkbun.

Step by Step in Porkbun

  1. Go to Porkbun and login.
  2. Click on “Account” button > “Domain Managment” button.
  3. Locate your domain and click the “Details” button > “edit” option next to “DNS Records”.
  4. Add the subdomain in the host field (ex: if url is doc.jpdiaz.dev, add “doc” for the host).
  5. Add a “cname.vercel-dns.com.” in the answer field.
  6. Click Add.

    Check the Porkbun documentation for more details.