I have just created a personal website which I host as github page and recently hooked it up with a custom domain. (In this post I changed the actual URLs to webmasters-example.com and webmasters-example.github.io)

I just checked my domain webmasters-example.com with the Google search console, and the console says that,

This page is not in the index, but not because of an error. See the details below to learn why it wasn't indexed.

And in the box below it says that the URL is being redirected, and because of that the site is not indexed.

I followed Namecheap's official guide on linking the domain with github. Is there a better way to do this? How can I get Google index my page?

enter image description here


Google won't index pages which redirect. Why would they index a page which simply redirects to another page that's already in the index?

If you want your domain to be the "main" URL for the page, then you need to change the A records (and remove the CNAME record) as per GitHub's instructions (the Namecheap instructions you followed appear to be for setting subdomains, at least based on GitHub's instructions).


That way your domain won't be seen as a redirect by Google and it will appear in the index. Then you just have to make sure the settings are correct in GitHub for it to be the canonical source of the pages (otherwise you run the risk of it being seen as duplicate content even though it is in actual fact simply the same content merely with a different URL).

  • So if I understand the docs you linked (I followed the one for apex domains), then I just need to remove the CNAME and A records as well, and just add an ALIAS that points to my webmasters-example.github.io? – gen Sep 26 '19 at 14:18
  • @gen If your provider supports ALIAS records, then yes. Otherwise just go for the A record. – GeoffAtkins Sep 26 '19 at 14:40
  • Thanks again. Just to confirm: doing the ALIAS solved the issue – gen Sep 27 '19 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.