Why isn't my page loading up on Github?
Asked Answered
C

4

6

I am trying to point my repo to a custom domain and receiving this error:

404 File not found

The site configured at this address does not contain the requested file. If this is your site, make sure that the filename case matches the URL. For root URLs (like http://example.com/) you must provide an index.html file.

Here is my repo: https://github.com/rohithpalagiri/rohithpalagiri.github.io

Here is the custom url: rohithpalagiri.com

I looked at my namecheap setting and it was set up correctly. Does anyone know if it's something in my code that's causing the issue?

Coquillage answered 3/10, 2016 at 17:52 Comment(0)
N
8

It currently takes the master branch.

Go in the repo settings and choose the gh-pages branch. Then click Save.

Nunes answered 3/10, 2016 at 17:56 Comment(4)
The option to change it is grayed out, do you know how I can change it so the option is available?Coquillage
Simply create a branch with another name. Otherwise, keep the HTML in the master branch and move the code which generates it in another branch.Gaming
Sorry I should have bee more specific, I already have a gh-pages branch but for some reason it's still grayed out and I can change it from master.Coquillage
Exactly. You don't need the gh-pages branch since it's a profile page. Just put the content in the master branch.Gaming
C
6

Hi you don't actually need a gh-pages branch for this repo, since you are using username.github.io, your master branch will do just fine. Think of github as the directory you are serving from, and it cannot find your index.html - it doesn't know to search inside of your build/ or src/ directories for it. So you could just have your index.html open in the repo and link from there, or pull your build out and make that your repo. Your master branch will work just fine, and keep the cname

Cordillera answered 3/10, 2016 at 21:1 Comment(0)
C
-1

I have found the same issue. Please check whether your repository contains an index.html file or not. If not, go to that folder and type git add index.html.

after that git commit -m "your commit name", and then git push and then check on your repository you will find

Ceil answered 8/8, 2023 at 22:32 Comment(0)
Y
-1

Change the name of your index html for instance I had named mine portfolio.html then I renamed it to index.html and it solved the issue. Go to file save as and then change the name.

Yes answered 14/12, 2023 at 13:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.