I want to make a repository public, however, I want to hide some information from search engines, which is located in that repository.
My repository has a file called imprint.html
, which contains my address and full name. I do not want that my GitHub account or the GitHub repository shows up after someone searches for my name or address.
The HTML file contains the following meta-element in its head: <meta name="robots" content="noindex, nofollow">
. This works fine when the website is deployed, my website will not show up when e.g. googling my name or address.
I'm aware of solutions like this one, which will hide the complete GitHub repository from search engines. However, I am fine with my GitHub repository showing up, when searching for its name. I just want that it does not show up when searching for information located in the imprint.html
file.
I am imagining three possible scenarios that could happen:
- Search Engines take the meta-element mentioned above into account, even in an HTML file located in a GitHub repository.
- Code from a GitHub repository is not indexed at all.
- I'll have to delete the file from my complete commit history before making the repository public.
How can I hide the specific file in my repository from Google or other search engines?