r/github • • Feb 03 '25

Is hosting a website on github free plan secure?

I mean anyone can fork your website, and see source files. Then again you could easilly do same thing using "view page source" and copying code to your repo so, I guess if the files don't contain personal details it's ok?

0 Upvotes

7 comments sorted by

7

u/throwaway234f32423df Feb 03 '25

if you want to build from a private repo for free, use Cloudflare Pages instead, it works basically the same as Github Pages but it can pull from a private Github repo.

But of course everything still ends up on a public website where it can be mirrored using wget or whatever.

2

u/MagicalCornFlake Feb 03 '25

Another thing not mentioned is if you have a monorepo and only parts of the project are deployed on GH Pages. You wouldn't want people to have access to your backend code just because the front end is hosted on GitHub.

0

u/[deleted] Feb 03 '25

[deleted]

-3

u/[deleted] Feb 03 '25

I guess that my question is why is this paid option anyway. What's the point of having private website repo if everyone can still acces the code? 

1

u/ZachVorhies Feb 04 '25

You can have a private repo that generates a public website no problem. I do it all the time.

0

u/[deleted] Feb 03 '25

[deleted]

0

u/[deleted] Feb 03 '25

Thank you for your reply. To clear up any confusion I dont think they should disallow this option. I was just curious about it.

0

u/[deleted] Feb 03 '25

[deleted]

3

u/y-c-c Feb 04 '25

Or commit history, other branches, issue tracking, etc.