2
votes

I have Created the repository named as username.github.io and tried to access the same URL in browser but i'm getting 404 error.

Checked in repository settings -> Under Github Pages Section, But it was not showing the message "your site is published at username.github.io"

Apart from this, is there anything i have to do...

Screenshot: enter image description here Actual URL: https://username.github.io

3

3 Answers

3
votes

To create a GitHub Pages site for your own username (i.e. a personal website and not a website for a repository), you need to replace the username part of username.github.io with your GitHub username. For example, if my username on GitHub is abcde, I would create a repository called abcde.github.io and then enable GitHub Pages in its settings as you have done.

0
votes

You need select source branch to publish(Initially it will be none. So nothing published) in
Settings -> Github pages --> source and click save. Then only it will be published to username.github.io URL.

Make sure your branch has index.html file.

0
votes

Normally, github pages URLs are generated as username.github.io/repo-name.

I'm not sure what naming the repo as you did would do, but in most cases, just name the repo as you normally would (a description of the project) and then publish the sites that way. If you already have code, here is how to rename the project in Github and updating the remote url

I'm not sure exactly why your pages aren't generating, but it likely has to do with the name of your repo.