46

I created my first repository with GitHub but when I try to google it, its not listing RoboSpice-Extn-Retrofit-Tutorial

EDIT

I don't know how long it will take. On the other hand anyone can take a help of Google Webmaster, this would solve your problem in minutes :)

ericcco
  • 741
  • 3
  • 15
Amit Yadav
  • 32,664
  • 6
  • 42
  • 57

4 Answers4

35

That repo seems to have been created less than an hour ago.
Give Google a little time to parse the new repos, and it should show up.

Note that it is referenced by GitHub search already:

https://github.com/search?utf8=%E2%9C%93&q=RoboSpice-Extn-Retrofit-Tutorial

As the OP used the Webmaster Tools to submit its url, the repo is now indexed in Google.


Update 2019: the section "Enabling GitHub Pages to publish your site from master or gh-pages" is now (since 2014) more precise:

To select master or gh-pages as your publishing source, you must have the branch present in your repository.
If you don't have a master or gh-pages branch, you can create them and then return to source settings to change your publishing source.

Once the correct branch is created/populated, and selected as the publishing source, the Google indexing seems to be very quick.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks but what about `github.io` pages? My post months before cannot be get from google. – Summer Sun Sep 04 '17 at 11:30
  • @SummerSun It should be indexed unless you are using a domain of your own with a robots.txt: https://stackoverflow.com/a/32805279/6309 – VonC Sep 04 '17 at 11:34
  • I created Repository "ArmoredDeathmatch" 4 years ago. I am not able to find it using google search. Only search box on github.com can find it. – nivs1978 May 01 '19 at 09:41
  • Is there a way to disable the indexing of Google, Bing, DuckDuckGo for a GitHub page? – Royi Oct 31 '20 at 15:22
  • @Royi I answered in 2015 about robot.txt (https://stackoverflow.com/a/32805279/6309), but the other answer about meta directive (https://stackoverflow.com/a/56223855/6309) is more up-to-date. – VonC Oct 31 '20 at 15:26
  • In my case, after 3 months nothing shows up on google. – DimiDak Jun 29 '23 at 15:13
  • @DimiDak What is your [publication source](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)? You might get more from an independent question here, with a reference back to this answer, and detailing your current setup. – VonC Jun 29 '23 at 22:02
  • @VonC , I followed the guide about GitHub Pages in your comment just now. I'll come back later, thanx. – DimiDak Jun 30 '23 at 15:55
19

This is how I managed to get at least my github pages-page to be found on Google:

  1. go to google search console https://search.google.com/search-console/
  2. add new "property" with "URL prefix" as suggested
  3. add the meta tag on your github-pages site (html-head) as described, looks like <meta name="google-site-verification" content="...">
  4. paste your page URL to the "search bar" on the top of the search console and press <Enter>. Important: use full path to page, including the .html page, e.g. https://<user>.github.io/<your repo>/demo/index.html
  5. Click on "request indexing"

I first only did points 1-3 with the URL https://<user>.github.io/<my-repo>/demo/ and the page still did not show up after waiting for a month. However after doing points (4) and (5) my github-pages site immediately showed up in the Google search results.

edit: one day later also the github repository showed up on Google search (but maybe only because I link the original repository in my github-pages site).

klues
  • 847
  • 12
  • 21
  • Which URL are you using in Step 2? In Step 2 are you using the URL for your `GitHub Page` or the URL for the `gh-pages` `branch` of your `GitHub repository` or the URL shown in your Step 4 or the URL that appears when you first access your `GitHub repository` (without `/tree/gh-pages` or `/tree/main` at the end)? I can find no search bar at the top of `Google Search Console` mentioned in Step 4. I can find no way to request indexing mentioned in Step 5. I see a `Verify` button. But when I click that button I get a message that the `meta tag is incorrect`. – Mark Miller Jun 29 '21 at 07:10
  • As stated in my answer: use the URL of your Github Page like `https://.github.io//demo/` for steps 1-3. The search bar on the top looks like this: https://i.imgur.com/iZQd6qP.png – klues Jun 29 '21 at 09:43
  • The search bar mentioned in Step 4 only appears if site verification is successful in Step 3. That search bar is not visible prior to Step 4. The URL shown in Step 4 is very confusing because it is combining the URL for the GitHub Page with the index.html file from the GitHub repository. When I press Enter in Step 4 I get a message that "Something went wrong" no matter what URL I paste into the search bar. Perhaps I need to wait a day or more before I can complete Step 4. You mentioned that a month passed before you completed Step 4. – Mark Miller Jun 29 '21 at 17:20
  • On Github Page you have the same files as in your GitHub repository (gh-pages branch or also main/master, depending on configuration), but hosted on a webserver, so I don't think it's confusing. The url `https://.github.io//demo/index.html` is just an example, if you don't have `index.html` or folder `demo` in your repo (gh-pages, master/main) branch, it won't work, you have to use a file existing in your repo. – klues Jun 30 '21 at 07:08
  • After posting my last comment I discovered that the `GitHub Page` can be displayed with or without `index.html` at the end of its `URL`. I still got an error in Step 4 when I pressed Enter. I had to wait ~48 hours before I could complete Step 4. Then I requested indexing as in Step 5. I got a message that the `URL` is not on `Google`. Maybe I need to wait another day or two for Google to index the site to complete Step 5. – Mark Miller Jul 01 '21 at 12:25
5

When GitHub auto-generate your page, you get only the _config.yml file and not the html files. So if you want to keep the default page and not write html yourself, you have to:

  • Find the original template from the theme's repository, for the slate theme the template is https://github.com/pages-themes/slate/blob/master/_layouts/default.html
  • Create a folder named _layout
  • Create a file called _layouts/default.html
  • In the default.html copy and paste the contents of the template
  • Follow klues post and generate your <meta name="google-site-verification" content="..."> tag
  • Add the meta tag to default.html
norbitrial
  • 14,716
  • 7
  • 32
  • 59
2

If you give some time to Google it will reflect in google search
Make sure to use better key words in your github ReadMe and title,tags of repo to make it more visible See this for an Example: https://github.com/anupama513/Tk102-gps-data-parser-nodejs-server

HariKishore K
  • 399
  • 3
  • 6