I created a GitHub pages repository. For some reason when I name it https://[username].github.io
, it doesn't work, but it works when I name it https://[username].github.io/index.html
.
Why?
Preparing your code for upload You can store any code you like in a GitHub repository, but to use the GitHub Pages feature to full effect, your code should be structured as a typical website, e.g. with the primary entry point being an HTML file called index. html .
If you've just placed an index. html or index. php file on your server's document root folder, for example: /public_html/ and you're still not getting it to load these files upon a request to your domain, chances are your server is missing a specific configuration for the "DirectoryIndex Directive".
In your repo page and file-listing, click through index. html and click the Edit button, which will let you edit index. html via the Github file editor. Commit your changes.
GitHub Pages lets you take a GitHub repository and turn it into a webpage. In other words, you can use a GitHub repository to host your HTML, CSS, and JavaScript files.
It got fixed automatically. I just had to wait for a while for the settings to take effect.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With