大网数据广告活动
网站运营与故障问答

Google Search Console: URL is not on Google (page with redirect)

· 52CE 我爱测

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 checke…

问题原文

原帖链接 · gen · CC BY-SA 4.0

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?


已采纳解答

原帖链接 · GeoffAtkins · CC BY-SA 4.0

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).

https://help.github.com/en/articles/using-a-custom-domain-with-github-pages

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).

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2019-09-25)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。