404 Error - Second Repo not displaying Github Pages

Hey @anilgeorge04 - welcome to the community.

Tacking on to @MichaelCurrin’s response…

There are probably a few different ways to accomplish what you want to do, but here’s the method I use:

  1. Repo 1 is set up as a User Page (docs)
    This means the repo name MUST be named <yourusername>.github.io.
    Add your CNAME in this repo and this repo only.
    Set up the custom domain in the repo’s settings on Github.com.

  2. Repo 2 is a Project Page
    The repo name can be anything you want really, just know that by default it will appear at the path customdomain.com/repo1name/.
    Your Jekyll _config.yml will have:

baseurl: /repo1name 
url: https://www.customdomain.com

If you want a live example, here are links to my production repos:
User Page: https://github.com/grantmakers/grantmakers.github.io
Project Page: https://github.com/grantmakers/profiles

Hope that helps steer you in the right direction!

2 Likes