This content originally appeared on DEV Community and was authored by Thomas Bnt ☕
Introduction
IndexNow is a protocol for rapidly indexing web pages on search engines. It was created by Bing and Yandex, and is now an open-source project.
Created in 2021, it is now supported by several search engines, including Bing, Yandex, Seznam, Naver and Yep.
How does it work?
The IndexNow protocol is based on the Ping protocol, which notifies search engines when a new article is published. IndexNow goes one step further, notifying search engines when a web page is updated.
To use IndexNow, simply send an HTTP POST request to the URL https://www.bing.com/indexnow
(or any other search engine with an /indexnow
API):
POST https://www.bing.com/indexnow HTTP/1.1
Content-Type: application/json; charset=utf-8
{
"host": "thomasbnt.dev",
"key": "0e11834b62ad4f089b83b91666a61105",
"keyLocation": "https://thomasbnt.dev/0e11834b62ad4f089b83b91666a61105.txt",
"urlList": [
"https://thomasbnt.dev/about",
"https://thomasbnt.dev/blog",
"https://thomasbnt.dev/uses",
"https://thomasbnt.dev/contact",
"https://thomasbnt.dev/terms"
]
}
Fields description
-
host
: the domain name of the website. -
key
: the public key generated for the website. -
keyLocation
: the URL of the public key. -
urlList
: the list of URLs to be indexed.
See the list of search engines supporting IndexNow →
Why use IndexNow?
IndexNow enables rapid indexing of web pages on search engines, which can be useful for websites that frequently publish content. This helps to improve the visibility of web pages on search engines and attract more traffic.
Implement IndexNow on my website
To implement IndexNow on your website, you can use a plugin like IndexNow WordPress Plugin, or send HTTP requests manually.
There are also hosting providers that support IndexNow, such as Cloudflare, WordPress.com, Shopify, etc. You can find the list directly on the site.
Let's go step by step
-
Generate a public key and add it to your
public/
folder on your website, this will create a link like thishttps://thomasbnt.dev/0e11834b62ad4f089b83b91666a61105.txt
(here0e11834b62ad4f089b83b91666a61105
is the public key). - Update your website with the key, or use a plugin that will do it for you.
- Send an HTTP POST request to the IndexNow API URL of the search engine you wish to use, with the public key and the list of URLs to be indexed. In this case, we're using Bing.
POST https://www.bing.com/indexnow HTTP/1.1
Content-Type: application/json; charset=utf-8
The request body should look like this:
{
"host": "thomasbnt.dev",
"key": "0e11834b62ad4f089b83b91666a61105",
"keyLocation": "https://thomasbnt.dev/0e11834b62ad4f089b83b91666a61105.txt",
"urlList": [
"https://thomasbnt.dev/about",
"https://thomasbnt.dev/blog",
"https://thomasbnt.dev/uses",
"https://thomasbnt.dev/contact",
"https://thomasbnt.dev/terms"
]
}
- You should receive a 200 OK response if the request was successfully sent. Note: I use the HTTP client HTTPie to send HTTP requests.
- Check that the pages have been indexed by consulting your website logs or by using search engine tools such as Bing's Bing Webmaster Tools.
- Congratulations, your web pages are now quickly indexed on search engines! 🎉
Useful links
- IndexNow official website
- IndexNow documentation
- Introducing IndexNow
- List of search engines supporting IndexNow
- IndexNow WordPress Plugin
- Cloudflare supporte IndexNow
This content originally appeared on DEV Community and was authored by Thomas Bnt ☕
Thomas Bnt ☕ | Sciencx (2024-09-19T09:55:16+00:00) Quickly index these web pages with IndexNow. Retrieved from https://www.scien.cx/2024/09/19/quickly-index-these-web-pages-with-indexnow/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.