Github pages does not display repositories other than the original

Hello,

I am new to git, github and github pages.

I did set up GitHub pages and got my main link http://<your-github-sername>.github.io.

It is my understanding that if I add a repository name at the end of the link, the content of the repository should be displayed on the browser.

http://<your-github-username>.github.io/repository-name

However this does not happen, as whenever I put  a repository name the browser send the error message 404 as below:

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.

I put my new_repository into the folder where my username.github.io is located, I did commit and put the changes of my new repository and still I am not able to make it display my website. 

Could someone help me please.

Thanks

2 Likes

Because u didn’t have specific Directory on your Host repo

for example,  

 that’s it, now good to go

for more information plz visit https://pages.github.com/

Hope these help! Can’t wait to see host page :smiley:

Happy Coding!

3 Likes

To have your repository show up at https://username.github.io/your-repository, you need to setup GitHub Pages for that repository as well.

6 Likes

Make sure your html file is called “index.html”

6 Likes

so i have a problem that the index page is showing up but not the other two pages. 

my index.html shows up fine and when i build it with my code editor the other two pages work, but not on the github.io site that was created.

1 Like

Sorry just to add to your issue as well but when my page is deployed it only shows the html portion and not the css portion https://landonjames.github.io/excursion/

1 Like

Hi @landonjames,

Since this is a different problem, you’d probably get better help by starting a new topic. However, there are a few topics with similar issues. Maybe this one might help?

Thanks!

@matttali09

I came across same issue, have you found a solution?

I got all my sub-pages working except particular one.

Obviously, locally everything works fine.

edit:

Sorted, in my case I was using by mistake “a” tag and href attribute instead of using “to” attribute and Link component.

@mariusz071 I had a similar solution, I didn’t realize the accuracy required for github vs open from files. I had my other pages capitalized in the anchor tag when the files were not capitalized in their actual name

You’ll find issues like that in more places than just GitHub because of how different operating systems handle things like capitals and special characters. Before working at GitHub, I was a web developer for many years and you wouldn’t believe how easy it is to have one of those mistakes lead to a “It works on my machine - why doesn’t it work here?” problem.

This solved for me, thanks!

I WAS PULLING MY HAIR OUT

I was following the tutorial from M1mo and could not figure out why their easy, 5 step tutorial to get the site up and running was going so smooth while I kept on getting that darn 404 message. My page was set up properly (user.github.io), gt pages were set up and the files were there and it was working on my local. Then, I dug a little bit deeper.

IT’S ALL IN THE DETAILS

Turns out my a href was pointing to I ndex with a CAPITAL ‘i’ while everything in my html files was to a lowercase ‘i’. It wasn’t working because I was pointing to the wrong thing from the very first a href in my header.

TL:DR

If your Index.html has a capital and you are pointing to index.html without a capital, it won’t work. Pay attention, code newbies.

2 Likes

Hey i did created new repo and also created a new folder locally inside my main repo folder and my index file name is index.html. But i still i’m getting 404 page not found. Am i missing something? 

Hi @imsree,

Is your repository public? If so, post a link and we can try to troubleshoot.

Thanks! 

Awesome, I had similar problem and figured out its cause is exactly like you say. Just change Index.html to index.html and it works like a charm. Thank you.

1 Like

I’m getting similar problem like above. I crossed checked my files again, but the file name and anchor tag name is similar like in small alphabets but still its not working.Please tell me the solution.

Hello, Top of the day to you! How are you and everyone at your end?

I hope you are all fine, and you are not affected with this pandemic. II am having some issues publishing my site on Github. Can i send the link down so you help me?

https://github.com/pavankmr1/firstrepo.git

Still not working. I have it setup i.e. https://github.com/the22ndmeusoc/the22ndmeusoc.github.io/tree/master/squads/xml there is no index.html or anything like that. There is only squad.xml. That’s by design. The site is not published, only for the default. Also, AFAIK, there is a requirement for “insecure” http, so to speak, so when I configure as such, I do not see the site being published. Do I need to register a domain name or something like that?

Good day…I have same issue as well.https://t.co/t2Edi25UDX. My pages aren’t displaying