Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 12

index.html not working

Solved! Go to Solution.

I have provided an index.html file in my github pages site, however when I try to access it with a root url it throws a 404. When I add /index.html to the end it works perfectly. You can see this happening in the attached imageb7b6dc5e1a3889a09e0d53088f55b25cError with root30e9fbd8bcc10bbd1403ace687e66686With /index.html.

The repository running the github site is at https://github.com/NicksWorld/Codes-js-demo .

11 Replies
Pilot Lvl 1
Message 2 of 12

Re: index.html not working

Hmm, I can't reproduce this - navigating to your website without index.html works fine.  Can you try again now?  And if still doesn't work, what browser version are you using?

Solution
Copilot Lvl 2
Message 3 of 12

Re: index.html not working

I already restructured the setup of the site, now it is all in the user site instead of project, and I use firefox.

Ground Controller Lvl 1
Message 4 of 12

Re: index.html not working

Can you please elaborate the solution as I am facing same problem

 

Ground Controller Lvl 1
Message 5 of 12

Re: index.html not working

How can you tell us?

Ground Controller Lvl 2
Message 6 of 12

Re: index.html not working

suffering from same problem how do i restructured the setups ?

 

Ground Controller Lvl 1
Message 7 of 12

Re: index.html not working

I had this exact error, my index.html was just a plaintext:

 

hola amigos

Then I changed it to a proper HTML doc:

 

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Página de prueba<title>
</head>
<body>
  <h1>Hola amiguitos!</h1>
  <footer>gpuma 2017</footer>
</body>
</html>

 I commited the new changes and it worked fine now.

Copilot Lvl 2
Message 8 of 12

Re: index.html not working

Hmm, I'm a new developer, but I have the same issue, however, everything mentioned above in terms of <!DOCTYPE html> was already implemented. 

 

I committed almost 21 hours ago and still nothing. With index.html at the end everything works. I see each product and can click into each product page. Screen Shot 2018-04-28 at 2.24.11 PM.pngWithout index.html products are missing and only one of the products (The 1st one) redirects to its product page.Screen Shot 2018-04-28 at 2.24.20 PM.png

Copilot Lvl 2
Message 9 of 12

Re: index.html not working

Thanks a lot. It's working as expected after this changes. Thanx.

Highlighted
Ground Controller Lvl 1
Message 10 of 12

Re: index.html not working

I have added front matter part to the readme.md and it fixed the problem.
---
permalink: /index.html
---

After this it shows index.html. I have found this solution also helps for custom 404 pages. https://help.github.com/articles/creating-a-custom-404-page-for-your-github-pages-site/