Github pages isn't working after switching from public to private and then back to public

I am using the free plan of github. After hearing the unlimited private repositories for free plans news, I thought I could make my personal website repo private. So I made the repo private. But then I noticed, github pages to work under private repo, you have to subscribe to github pro plans. So I revert back to public. But now my site isn’t working. How can I re-enable my site?

update: My site is working because as I didn’t get any solution, I have deleted my old repository and recreated it. Still I am waiting for a good solution.


Unfortunately, we can’t make a guess as to what might have gotten wedged that was preventing this from working. If anyone else runs into this, please reach out to GitHub Support at so they can take a deeper look at what the issue might be.

NB: Response edited December 2020 to reflect changes in GitHub’s support channels.

1 Like

This happened to me as well - I’ve also emailed support in hopes of a solution.

This problem seems to resolve itself if you push any commit to your pages branch.


What about master branch? I tried to make my repo public and did a push to master branch (only branch I have)

It did work for me after pushing to master branch

Any thoughts on how I can remedy this situation? I already sent an email to support.

I turned the repo to private, realized the page went 404. Made the repo public again and the 404 remains.

It looks like the UI settings where GitHub pages (page) use to be has changed considerably. I don’t see any option to republish the page and the option to redirect my custom domain url.

Plus one. Were you able to fix this issue? My page is down. I did the exact same thing as you. Also, I don’t see an option to republish and add a redirect under settings no more.

Thanks Bro. It also worked for me after pushing to the main branch. :slight_smile:

I have solved after pushing a commit to master branch

Dude You free me from tensed… Thanks Man :slight_smile:

Hi friends, 

Updating this thread to share a solution that has worked for some, please try mind pushing a commit to your repository to trigger a build, this should take care of the issue. 

I hope this helps!-


The same exact thing happened to me too today.

I initially thought making a personal/user github page repo would  enable my pages public even though repo can be set to private.Looks like it is not so and is only availble for Github Pro

So now I have set back to Public again and "Your page is published at “URL” is missing rom the section in options under settings

Pls correct this Github

1 Like

This happened to me too. Here’s how I fixed it.

1 Go to the ‘repository page’

2 Click on ‘settings’ 

3 Scroll down to ‘Github Pages’

4 Click on the dropdown for ‘Source’

5 Select ‘master branch’

Then refresh your website and it should work.


Going to add to this. I tried re-committing to the master and it didn’t work. However, it did after removing all of my site files, committing, and then adding them back into the repo before committing again.

1 Like

I got the same problem. The solution I tried is to rename the repo, and then rename back. Fortunately, it worked like a charm.


I did this and then I did the rename and rename back. Now it’s working.

1 Like

Bro I only have master branch. I created a random file and committed . Nothing happened even then.

Edit : It worked now lol

@andychung wrote:

This problem seems to resolve itself if you push any commit to your pages branch.

This worked for me. thank you

This hasn’t been the case for me. My last commit is 18 minutes ago on the master branch.

EDIT: While writing this reply I tried committing directly on the remote repository via editing my file. This seems to have worked as opposed to pushing commits to the remote repository.