Launch your website with GitHub Pages – It's that simple!

Follow our step-by-step guide to create and deploy your website using GitHub Pages. No technical expertise required!

Step 1: Purchase Your Domain

Use a domain registrar like Namecheap or GoDaddy to purchase a custom domain.

  • Choose a memorable domain name
  • Check availability
  • Complete the purchase process

Step 2: Set Up Your GitHub Account

If you don't have one yet, create a GitHub account here.

GitHub Pages is a static site hosting service that takes files from a repository, runs the files through a build process, and publishes a website.

Step 3: Create Your GitHub Repository

Create a new repository with the name [username].github.io

  1. Click the "+" icon in the top right
  2. Select "New repository"
  3. Name it [your-username].github.io
  4. Make it public

Step 4: Upload Your Website Files

Upload your HTML, CSS, and JS files to the GitHub repository you just created.

your-repo/
├── index.html
├── styles.css
├── script.js
└── assets/
    └── images/

Step 5: Configure DNS

Point your domain to your GitHub Pages repository using CNAME records.

Add these records to your domain provider:

  • Type: CNAME
  • Name: www
  • Value: [username].github.io

Add these A records pointing to GitHub Pages IP addresses:

Each record should have the same host (@) but different IP values:

Record 1:

  • Host: @
  • Type: A
  • Value: 185.199.108.153

Record 2:

  • Host: @
  • Type: A
  • Value: 185.199.109.153

Record 3:

  • Host: @
  • Type: A
  • Value: 185.199.110.153

Record 4:

  • Host: @
  • Type: A
  • Value: 185.199.111.153

Step 6: Enable GitHub Pages

Go to the repository settings and enable GitHub Pages.

  1. Go to Settings > Pages
  2. Select "main" branch as source
  3. Click "Save"
  4. Under "Custom domain", enter your domain name
  5. Check "Enforce HTTPS" to make your website more secure

Security Note: Enforcing HTTPS ensures that all traffic to your website is encrypted, protecting your visitors' data and improving your site's security.

Congratulations! Your Website is Live! 🎉

You've successfully set up your website on GitHub Pages!