index_now
Index Now submit requests to search engines when content (nodes, taxonomy terms, commerce products) has been created, updated or deleted on your website. The module provides a service that you can use to send more requests according to your needs.
Supported search engines are:
- Amazon
- IndexNow
- Microsoft Bing
- Naver
- Seznam.cz
- Yandex
- Yep
Note: Since November 2021, compatibles search engines will immediately share all the submitted URLs with every other compatible search engine.
This means that if you choose to notify one search engine, you notify every other one in the same time.
Read more about Index Now project
Requirements
- The module requires Configuration split
Installation
Install as you would normally install a contributed Drupal module. Visit https://www.drupal.org/node/1897420 for further information.
For commerce products you also need to enable the index_now_commerce sub-module
Configuration
- Go to
/admin/config/services/index_nowand choose the default search engine you want to interact with.
You can also exclude content types, taxonomy vocabularies and/or commerce
products types for which you don't want to use Index Now. - after configuring Index Now (
/admin/config/services/index_now), you need to define a configuration for your production environment.
Go toadmin/config/development/configuration/config-split, add a configuration split setting if you don't have already one for your production environment, then add a directory path for this config and enable "Index Now" in the "Complete split" > "Modules" section. Don't forget to export your configuration after submitting the form.
You can override the API key value if needed in your settings(.local).php
$settings['index_now']['api_key'] = 'whatever-you-want';
Service
The module provides a service that can be used to index other URLs than just nodes, taxonomy terms and commerce products pages.
Here is how to use it:
\Drupal::service('index_now.indexnow')->sendRequest($your_url);
Note: $your_url must be an absolute URL hosted on your website.
Drush command
In case you would need to regenerate the API key you can use the drush command:
drush index_now:keygenerate or its alias drush indnowkeygen