Showing ownly readme file

I developed a react site with my custom domain and it’s only showing readme file.
Here is my github repo :
Here is my domain :

1 Like

Hello @hainhtat ,

I checked your repo and looks like you have an html file at the root level which is good.

If you want to bring up a page and make it serve from the root level, you would need to rename the file as index.html (lowercase). This should fix the issue.

Let us know if you still face any issues

Thank you for your help but I’m a bit confused. The File name is already index.html. I want to show that index.html from gh-pages branch but instead readme from main branch is shown.

It looks like your Pages site is set to build from the master branch. You’ll need to change this to the gh-pages branch from the repository settings before it will show the site hosted in that branch.

I have changed the master to gh-pages but it showed error 404 there isn’t a github pages site here.

You’ll need to link your custom domain again. GitHub attaches a custom domain to a repository by creating a file called CNAME in the root of your site’s publishing source that contains the domain. As you’ve changed the deployment branch that file is now not present, meaning your domain has become unlinked.

You can fix it by adding the custom domain in the repository settings!

I have added the CNAME file in the gh-pages and received a mail that says that my ip address is outdated. Here is my dns record

Thanks for your help. I changed the dns settings and finally got it.

Nice! :smile: Yeah, I think those are the old Pages IPs, so you’d need to change your A records to the new IPs. For anyone else looking in future the new ones they’re listed in the instructions on this page here: