2

This is similar to this question on Stack Overflow, but I want to keep the indexing of the original repo and stop indexing of the GitHub pages sites that are generated from the forks of the original repo. We use forks to stage changes to the main website.

Here is the question on Stack Overflow:

I have a github page from my repository username.github.io

However I do not want Google to crawl my website and absolutely do not want it to show up on search results.

Will just using robots.txt in github pages work? I know there are tutorials for stop indexing Github repository but what about the actual Github page?

3
  • 1
    I think the answer there is still relevant: don't apply the noindex meta tag to your original repo/master branch, but apply it to the forks so they won't be indexed (at least by Google). Perhaps you can have the meta tag on the main/master branch initially so that it's in the forks, but later remove it from the main/master branch. I don't do this myself, so can't be sure about the specifics though.
    – dan
    Commented Feb 17, 2022 at 0:30
  • I think this will work but will need to be on every page on the site right? A lot of the site is auto generated so I'm trying to figure out the logistics of doing this
    – natke
    Commented Feb 17, 2022 at 19:40
  • 1
    Yes, every page that you don't want indexed will need the noindex meta tag. Sorry I can't help with the logistics - good luck!
    – dan
    Commented Feb 17, 2022 at 21:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.