Submit Entire Sitemap to the IndexNow API#
submit_sitemap_to_index_now()
#
Submit a sitemap to the IndexNow API of a search engine.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
authentication | IndexNowAuthentication | Authentication credentials for the IndexNow API. | required |
sitemap_url | str | The URL of the sitemap to submit, e.g. | required |
contains | str | None | Optional filter for URLs. Can be simple string (e.g. | None |
skip | int | None | Optional number of URLs from the sitemap to be skipped. Ignored by default and if set to | None |
take | int | None | Optional limit of URLs from the sitemap to taken. Ignored by default and if set to | None |
endpoint | SearchEngineEndpoint | str | Select the search engine you want to submit to or use a custom URL as endpoint. | INDEXNOW |
Example
After adding your authentication credentials to the IndexNowAuthentication
class, you can now submit an entire sitemap to the IndexNow API:
If you want to submit to a specific search engine, alternatively customize the endpoint:
If you want to only upload a portion of the sitemap URLs, alternatively use the skip
and take
parameters:
How to target URLs with a specific pattern by using the contains
parameter:
The contains
parameter also accepts regular expressions for more advanced filtering:
Or combine the contains
, skip
, and take
parameters to filter the URLs even further: