Google 搜索控制台是一个有用的工具,可以帮助您了解 Google 如何抓取您的网站,并更改 Google 索引您的网站的设置。
要查看此信息,您需要注册 Google 搜索控制台并将您的网站添加到其中。
是否使用URL前缀属性或域名属性
Google 搜索控制台有两种添加网站的方法:您可以使用 URL 前缀属性或域名属性。
域名属性是最强大的。然而,为了将您的域名验证为域名属性,您需要在域名上设置一个TXT记录。这在InfinityFree的域名服务器上是不可能的。如果您在域名上使用第三方域名服务器(如Cloudflare),您可以使用此选项。
如果您使用的是InfinityFree的名称服务器,您可以使用URL属性代替。这只需要进行网站验证,可以在任何(子)域名和任何名称服务器上完成。
确保您的网站基础网址一致
如果你有一个域名 example.com
并且在你的域名上设置了SSL,那么以下所有URL将提供相同的内容:
为了在 Google 搜索控制台中获得正确的统计数据(并 generally 改善您的网站的 SEO),您应该确保将上述所有 URL 重定向到一个单独的 URL(无论是使用还是不使用 HTTPS,无论是使用还是不使用 www)。
有多种方法可以做到这一点。如果您的网站有网站网址选项,首先应将其配置为正确的网址。这也可以解决重定向问题。
您还可以使用.htaccess规则来强制执行重定向。您可以通过在网上搜索找到示例.htaccess片段。
将您的网站添加到 Google 搜索控制台
要将您的网站添加为URL前缀属性,您可以执行以下操作:
前往 Google 搜索控制台 并使用您的 Google 帐户登录。
点击“添加属性”并选择类型“URL前缀”。
输入网站基础URL,包括
http://
或https://
并可选地输入www
子域名。选择验证方法 HTML 文件。
将HTML文件下载到您的电脑。
打开文件管理器或连接到您的主机账户的FTP客户端,然后导航到您的网站文件夹。
将您刚刚下载的HTML文件上传到htdocs文件夹。
点击“验证”按钮以完成验证。
这便是您需要做的所有验证域名的工作!
Google 搜索控制台允许用户通过使用 CNAME 记录将其 (子) 域名添加为域名属性。
当用户添加他们的域属性时,系统会提示他们添加一个TXT记录。然而,用户可以将记录类型更改为CNAME:
这将允许他们添加他们的网站。
将您的网站添加为 Google 搜索控制台的域名属性
要将您的网站添加为域属性,请执行以下操作:
前往 Google 搜索控制台 并使用您的 Google 帐户登录。
点击“添加属性”并选择类型“域”
输入网站的基本URL,不包括
http://
,https://
在其后。例如,您会使用example.com
选择记录类型
CNAME Record
前往 InfinityFree 客户区域,选择您的域名托管账户,选择您的域名,然后选择
DNS Records
.选择
Add Record
,然后选择Create CNAME Record
复制
CNAME Label/Host
从控制台,粘贴到Name
字段复制
CNAME Destination / Target
从控制台,粘贴到Target
字段选择
Create CNAME Record
在控制台中,选择
Verify
如果操作成功,您的域名现在应该作为一个域属性添加进去!(由于DNS传播,记录可能需要长达72小时才能显示)
Google Search Console is a useful tool to help you learn about how your website is being crawled by Google and change settings as to how Google indexes your website.
To view this information, you need to sign up to Google Search Console and add your website to it.
Whether to use a URL-prefix property or Domain property
Google Search Console has two ways to add a website: you can use a URL-prefix property or Domain property.
The domain property is most powerful. However, in order to verify your domain name as a Domain property, you need to set up a TXT record on your domain. This is not possible on InfinityFree’s nameservers. If you use third party nameservers on your domain (like Cloudflare), you can use this option.
If you’re using the InfinityFree nameservers, you can use a URL property instead. This only requires a website verification, which can be done on any (sub) domain and any nameservers.
Make sure your website base URL is consistent
If you have a domain name example.com
and have SSL set up on your domain, then all the following URLs will serve the same content:
In order to get correct stats in Google Search Console (and generally improve your site’s SEO), you should make sure you are redirecting all of the URLs above to a single URL (either with or without HTTPS and with or without www).
There are multiple ways to do this. If your website has a Website URL option, that should first be configured to the right URL. This may also fix the redirects.
You can also use .htaccess rules to enforce the redirects. You can find example .htaccess snippets by searching the web.
Adding your website to Google Search Console
To add your website as a URL-prefix property, you can do the following:
Go to Google Search Console and sign in with your Google account.
Click “Add property” and choose the type “URL prefix”.
Enter website base URL, including
http://
orhttps://
and optionally thewww
subdomain.Choose verification method HTML file.
Download the HTML File to your computer.
Open a file manager or FTP client connected to your hosting account, and navigate to your website folder.
Upload the HTML file you just download to the htdocs folder.
Click the “Verify” button to complete the verification.
That’s all you need to do to verify your domain name!
Google Search Console allows users to add their (sub)domain as a Domain Property with the use of a CNAME record.
When the user adds their Domain Property, they are prompted to add a TXT record. However, the user can change the record type to CNAME:
Which will allow them to add their website.
Can you please update this document to reflect this?
Adding your website as a Domain Property to Google Search Console
To add your website as a Domain Property, do the following:
Go to Google Search Console and sign in with your Google account.
Click “Add property” and choose the type “Domain”
Enter the website base URL, without the
http://
,https://
behind it. For example, you would useexample.com
Select the record type
CNAME Record
Go to the InfinityFree Client Area, select your domain’s hosting account, select your domain, then select
DNS Records
.Select
Add Record
, then selectCreate CNAME Record
Copy the
CNAME Label/Host
from the console, and paste it into theName
fieldCopy the
CNAME Destination / Target
from the console, and paste it into theTarget
fieldSelect
Create CNAME Record
In the Console, select
Verify
If done successfully, your domain should now be added as a Domain Property! (Due to DNS Propagation, the records may take up to 72 hours to appear)
推荐本站淘宝优惠价购买喜欢的宝贝:
本文链接:https://www.hqyman.cn/post/12100.html 非本站原创文章欢迎转载,原创文章需保留本站地址!
休息一下~~