Github Pages Not Detecting index.html

For my GitHub Pages repository I have created an index.html file and I have a custom domain but for some reason when I visit my website (with custom domain) like https://example.com it shows me this error (look at image below) as in it like says there is no index.html file even though there is…

Is your repository set to public? GitHub Pages doesn’t work with private repositories, I don’t believe.

Found out that if I use the https so like if I visited https://example.com it would show the error but If I visit http://example.com it works for some reason and yes it is private but I’m a pro user so I can have it private fine

Or even If I visit https://example.com/index which works fine for some reason…

The fix was clearing my cache :slight_smile:

3 Likes

Hi @Tekaoh, GitHub Pages are indeed supported on private repositories. It’s mentioned within the documentation.

1 Like

For future reference, if you are unable to clear your cache for any reason, you can add fake parameters to the end of your URL ( http://www.test.com/?x=test1 ) or a unique hash ( http://www.test.com/#test1 ) as this will generally not affect the page contents, but will generate a unique request for each unique value of x .

2 Likes

Nice tip @baileyjm02 !

Ah, I stand corrected. Thanks!

I had a situation a while back where my GitHub Pages site wasn’t showing up and the solution for me was setting the repository to public. I therefore surmised that private repositories weren’t supported. But I guess something else was making the difference.

Thanks for letting me know