https://www.indexnow.org/documentation
https://www.indexnow.org/zh_cn/documentation
Documentation
Submitting One URL
To submit a URL using an HTTP request (replace
https://<searchengine>/indexnow?url=url-changed&key=your-key
url-changed is a URL of your website which has been added, updated, or deleted. URL must be URL-escaped and encoded and please make sure that your URLs follow the RFC-3986 standard for URIs.
Your-key should have a minimum of 8 and a maximum of 128 hexadecimal characters. The key can contain only the following characters: lowercase characters (a-z), uppercase characters (A-Z), numbers (0-9), and dashes (-).
For example, if you want to notify search engines that https://www.example.com/product.html has been updated, and you want to use this key
https://<searchengine>/indexnow?url=https://www.example.com/product.html&key=093f353ebfad48b0ad4871ff690a9d43
You can issue the HTTP request using your browser, wget, curl, or any other mechanism of your choosing. A successful request will return an HTTP 200 response code; if you receive a different response, verify that you don’t submit too often, that the key and URL are valid and resubmit the request. The HTTP 200 response code only indicates that the search engine has received your URL.
Submitting set of URLs
To submit a set of URLs using an HTTP request issue your POST JSON request to the URL provided by Search Engines. Replace
POST /indexnow HTTP/1.1Content-Type: application/json; charset=utf-8Host: <searchengine>{ "host": "www.example.com", "key": "093f353ebfad48b0ad4871ff690a9d43", "urlList": [ "https://www.example.com/url1", "https://www.example.com/folder/url2", "https://www.example.com/url3" ]}
You can submit up to 10,000 URLs per post, mixing http and https URLs if needed.
You can issue the HTTP request using wget, curl, or another mechanism of your choosing. A successful request will return an HTTP 200 response code; if you receive a different response, you should verify your request and if everything looks fine, resubmit your request. The HTTP 200 response code only indicates that the search engine has received your set of URLs.
The recommended way is to automate submission of URLs as soon as the content is added, updated, or deleted up to some limit; see best practices for user generated content in the Frequently Asked Questions.
Verifying ownership via the key
To submit URLs, you must "prove" ownership of the host for which URLs are being submitted by hosting at least one text file within the host. Once you submit your URLs to search engines, search engines will crawl the key file to verify ownership and use the key until you change the key. Only you and the search engines should know the key and your file key location.
We offer two ways to verify ownership.
You must host a UTF-8 encoded text key file {your-key}.txt listing the key in the file at the root directory of your website.
For instance for the previous examples, you will need to host your UTF-8 key file at https://www.example.com/
You can also host one to many UTF-8 encoded text key files in other locations within the same host and you must tell search engines the location of this text key file in each IndexNow notification by specifying the location using the keyLocation variable.
If you submit an URL, specify the key file location as keyLocation URLs parameter value.
https://<searchengine>/indexnow?url=http://www.example.com/product.html&key=093f353ebfad48b0ad4871ff690a9d43&keyLocation=http://www.example.com/myIndexNowKey63638.txt
If you submit a set of URLs, specify the key file location as keyLocation variable in the JSON content.
POST /indexnow HTTP/1.1Content-Type: application/json; charset=utf-8Host: <searchengine>{ "host": "www.example.com", "key": "093f353ebfad48b0ad4871ff690a9d43", "keyLocation": "https://www.example.com/myIndexNowKey63638.txt", "urlList": [ "https://www.example.com/url1", "https://www.example.com/folder/url2", "https://www.example.com/url3" ]}
In this option 2, the location of a key file determines the set of URLs that can be included with this key. A key file located at http://example.com/catalog/key12457EDd.txt can include any URLs starting with http://example.com/catalog/ but cannot include URLs starting with http://example.com/help/.
URLs considered valid in http://example.com/catalog/ include:
URLs not considered valid in http://example.com/catalog/ include:
URLs that are not considered valid in option 2 may not be considered for indexing. It is strongly recommended that you use Option 1 and place your file key at the root directory of your web server.
Response format
Requirement for search engines
Search engines adopting the IndexNow protocol agree that submitted URLs will be automatically shared with all other participating search engines. To participate, search engines must have a noticeable presence in at least one market or be closely linked to the search market and make a significant contribution to the number of url submissions. Learn more
文档
要使用 HTTP 请求提交一个URL(用搜索引擎提供的 URL 替换 已更改 URL 是你已被添加、更新或删除网站的一个 URL。URL 必须经过 URL 转义和编码,请确保你的 URL 遵循 RFC-3986 的 URI 标准。 你的秘钥密续至少最少有 8 个,最多 128 个十六进制字符。密钥只能包含以下字符:小写字母(a-z),大写字母(A-Z),数字(0-9),以及短破折号(-)。 例如,如果你想通知搜索引擎,https://www.example.com/product.html 已更新,并且你想使用此秘钥 你可以使用浏览器、wget、curl 或你选择的任何其他机制发出 HTTP 请求。请求成功将返回一个 HTTP 200 响应代码;如果你收到不同的响应,请验证提交的次数是否过多,密钥和 URL 是否有效,并重新提交请求。HTTP 200 响应代码只表明搜索引擎已收到你的 URL。 要使用 HTTP 请求提交一组 URL,请向搜索引擎提供的 URL 发出 POST JSON 请求。用搜索引擎的主机名称替换 你可以在每次发布中提交最多 10,000 个URL,如果需要,可以混合 http 和 https URL。 你可以使用 wget、curl 或你选择的任何其他机制发出 HTTP 请求。请求成功将返回一个 HTTP 200 响应代码;如果你收到不同的响应,你应该验证请求,如果一切看起来没问题,就重新提交请求。HTTP 200 响应代码只表明搜索引擎已收到你的 URL 组。 推荐的方法是,内容被添加、更新或删除以后,就自动提交URL,但要达到一定的限度;见《常见问题解答》中的用户生成内容的最佳做法。 要提交 URL,你必须通过在主机内存放至少一个文本文件以“证明”对提交 URL 的主机的所有权。向搜索引擎提交的 URL 后,搜索引擎将爬网秘钥文件以验证所有权,并使用秘钥,直到你更改钥匙。只有你和搜索引擎知道秘钥和文件钥匙的位置。 有两种方式可以验证所有权。 必须在你的网站根目录下托管一个 UTF-8 编码的文本密钥文件{your-key}.txt,在文件中列出密钥。 例如,对于前面的例子,你将需要把你的UTF-8密钥文件托管在 https://www.example.com/ 你也可以在同一主机的其他位置托管一个到多个 UTF-8 编码的文本密钥文件,你必须在每个 IndexNow 通知中通过使用 keyLocation 变量指定位置告知搜索引擎这个文本密钥文件的位置。 如果你提交了一个 URL,指定密钥文件位置作为 keyLocation URLs 参数值。 如果你提交一组 URL,在 JSON 内容中指定密钥文件的位置作为 keyLocation 变量。 在此方案 2 中,一个密钥文件的位置决定了这个密钥可以包含的 URL 组。一个位于 http://example.com/catalog/key12457EDd.txt 的密钥文件可以包括以 http://example.com/catalog/ 开始的任何 URL,但不能包括以 http://example.com/help/ 开始的URL。 URLs not considered valid in http://example.com/catalog/sitemap.xml include: 在方案 2 中被认为无效的 URL 可能无法被考虑用于索引。强烈建议使用方案 1,将文件密钥放在网络服务器的根目录下。 Search engines adopting the IndexNow protocol agree that submitted URLs will be automatically shared with all other participating search engines. To participate, search engines must have a noticeable presence in at least one market or be closely linked to the search market and make a significant contribution to the number of url submissions. Learn more提交一个 URL
https://<searchengine>/indexnow?url=url-changed&key=your-key
https://<searchengine>/indexnow?url=https://www.example.com/product.html&key=a13040d451804f3ebdaafc0639ae76f3
提交一组 URL
POST /indexnow HTTP/1.1Content-Type: application/json; charset=utf-8Host: <searchengine>{ "host": "www.example.com", "key": "a13040d451804f3ebdaafc0639ae76f3", "urlList": [ "https://www.example.com/url1", "https://www.example.com/folder/url2", "https://www.example.com/url3" ]}
通过秘钥验证所有权
https://<searchengine>/indexnow?url=http://www.example.com/product.html&key=a13040d451804f3ebdaafc0639ae76f3&keyLocation=http://www.example.com/myIndexNowKey63638.txt
POST /indexnow HTTP/1.1Content-Type: application/json; charset=utf-8Host: <searchengine>{ "host": "www.example.com", "key": "a13040d451804f3ebdaafc0639ae76f3", "keyLocation": "https://www.example.com/myIndexNowKey63638.txt", "urlList": [ "https://www.example.com/url1", "https://www.example.com/folder/url2", "https://www.example.com/url3" ]}
Response format
Requirement for search engines
推荐本站淘宝优惠价购买喜欢的宝贝:
本文链接:https://www.hqyman.cn/post/7141.html 非本站原创文章欢迎转载,原创文章需保留本站地址!
休息一下~~