Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix HTTP 404 on Github Pages?

Here is my GitHub repository on the gh-pages branch. Everything looks good, I have my index.html, my CSS, JS and pictures folders.

But when I access http://roine.github.com/p1 I get HTTP 404 not found.

Any explanation and solution?

like image 527
Jonathan de M. Avatar asked Jul 20 '12 10:07

Jonathan de M.


People also ask

What does 404 mean in GitHub?

The preferred files to be served are index. html , index.md , and README.md , in that order. If none of these files exist, your website will show a 404 Not Found error, even if there are other HTML files in the repository. Note that GitHub Pages is case-sensitive, so Index.

How do you fix the 404 error?

The simplest and easiest way to fix your 404 error code is to redirect the page to another one. You can perform this task using a 301 redirect. What's 301, you may ask? It's a redirect response code that signals a browser that the content has been transferred to another URL.

Why do I keep getting error code 404?

404 error codes are generated when a user attempts to access a webpage that does not exist, has been moved, or has a dead or broken link. The 404 error code is one of the most frequent errors a web user encounters. Servers are required to respond to client requests, such as when a user attempts to visit a webpage.


1 Answers

I had just one commit with all my files. I pushed an empty commit, refreshed the page and it worked.

git commit --allow-empty -m "Trigger rebuild" git push 

If this doesn't work, as @Hendrikto pointed out in the comments, check out the Github status page and make sure GitHub Pages are operational.

like image 105
Arnaud Avatar answered Sep 22 '22 17:09

Arnaud