URLs to IndexNow Using JSON
and Linux Curl
Sending Multiple URLs to IndexNow Using JSON. Bing Webmaster Tools uses IndexNow to index updated or newly created website content.
Sending Multiple URLs to IndexNow Using JSON and Linux Curl
Bing Webmaster Tools uses IndexNow to index updated or newly created website content. Follow the following steps.
- Generate API Key. This key matches the ownership of the domain with submitted URLs. This can be performed on the Bing or IndexNow website.
- Host the API key, by placing a text file with the key in the root of your website. The file is created in a text editor. The file name is the key characters with the suffix txt.
- Submit the URLs with curl from the command line. (I am using Linux Mint.) The URLs will be sent in a JSON formatted file. You can send the JASON header and the URLs in one long command. Or you can separate the header, and URLs into a separate file.
- I have listed the files I used below. Use them as a template for your own submissions. Copy the files into a text editor for editing. Then copy and paste to the Linux command line. Notice that curl is used. Press enter. The files should be uploaded to Bing.
Sample text file for the domain root, with the key listed inside the text document:
d0d82bfb6d464090b3c722abfbb43.txt
d0d82bfb6d464090b3c722abfbb43
Sample JSON command line entry to submit two URLs.
(Substitute your API Keys, and your domain with URLs. Remember the slashes at the ends of some lines to continue the line.) After copy and pasting press
Enter. There should be no errors.
curl -v -H 'Content-Type:application/json; charset=utf-8' \
-H POST \
-d '{"host":"https://www.example.com",
"key":"d0d82bfb6d464090b3c722abfbb43",
"keyLocation":"https://www.example.com/d0d82bfb6d464090b3c722abfbb43.txt",
"urlList":["example.com/jupyter-windows-install-for-deep-learning/",
"example.com/jupyter-windows-install-with-test-program/index.html"]
}' \
https://www.bing.com/indexnow
Sample JSON Header command line entry, followed by the file urls.json.
The file
urls.json should be created with a text editor (such as nano or vi) in the same location where you will copy and paste the command Header. After copy and pasting the Header press
Enter. There should be no errors.
HEADER
curl -v -H 'Content-Type:application/json; charset=utf-8' \
-H POST \
-d @urls.json \
https://www.bing.com/indexnow
FILE
{"host":"https://www.example.com",
"key":"d0d82bfb6d464090b3c722abfbb43",
"keyLocation":"https://www.example.com/d0d82bfb6d464090b3c722abfbb43.txt",
"urlList":["example.com/anaconda-and-jupyter-windows-install-for-deep-learning/",
"example.com/jupyter-windows-install-with-test-program/index.html"]
}