Implement IndexNow protocol to replace Google sitemap ping functionality #750
+537
−19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements the IndexNow protocol to instantly notify search engines about content updates, replacing the deprecated Google sitemap ping functionality as requested in issue #401.
What is IndexNow?
IndexNow is a modern protocol supported by major search engines (Bing, Seznam.cz, Naver) that allows websites to instantly notify search engines when URLs are added, updated, or deleted, providing faster indexing than traditional sitemap crawling.
Implementation Details
New Endpoints Added
/sitemap.xml
- Generates XML sitemap from existing site mapping data with proper caching/{key}.txt
- Serves IndexNow key file for search engine verification/api/notify-indexnow
- Manual trigger endpoint for testing and content updatesCore Services
IndexNowService
- Handles notifications to multiple search engine endpointsSitemapController
- Manages sitemap generation and IndexNow endpointsIndexNowExtensions
- Helper methods for easy programmatic integrationConfiguration
Usage Examples
Technical Highlights
sitemap.json
data withIncludeInSitemapXml
filteringrobots.txt
sitemap referenceTesting
SitemapControllerTests
with 4 comprehensive integration testsDocumentation
Comprehensive documentation added in
INDEXNOW.md
covering:Migration Benefits
The implementation is minimal, focused, and ready for production deployment.
Fixes #401.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
api.hcaptcha.com
/usr/lib/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.deps.json /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/testhost.dll --port 44341 --endpoint 127.0.0.1:044341 --role client --parentprocessid 3907 --telemetryoptedin false
(dns block)/usr/lib/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.deps.json /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/testhost.dll --port 46199 --endpoint 127.0.0.1:046199 --role client --parentprocessid 5279 --telemetryoptedin false
(dns block)/usr/lib/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.deps.json /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/testhost.dll --port 38531 --endpoint 127.0.0.1:038531 --role client --parentprocessid 6511 --telemetryoptedin false
(dns block)api.indexnow.org
/usr/lib/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.deps.json /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/testhost.dll --port 41667 --endpoint 127.0.0.1:041667 --role client --parentprocessid 5947 --telemetryoptedin false
(dns block)/usr/lib/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.deps.json /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/testhost.dll --port 38531 --endpoint 127.0.0.1:038531 --role client --parentprocessid 6511 --telemetryoptedin false
(dns block)search.seznam.cz
/usr/lib/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.deps.json /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/testhost.dll --port 41667 --endpoint 127.0.0.1:041667 --role client --parentprocessid 5947 --telemetryoptedin false
(dns block)/usr/lib/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.deps.json /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/testhost.dll --port 38531 --endpoint 127.0.0.1:038531 --role client --parentprocessid 6511 --telemetryoptedin false
(dns block)searchadvisor.naver.com
/usr/lib/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.deps.json /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/testhost.dll --port 41667 --endpoint 127.0.0.1:041667 --role client --parentprocessid 5947 --telemetryoptedin false
(dns block)/usr/lib/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.deps.json /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/testhost.dll --port 38531 --endpoint 127.0.0.1:038531 --role client --parentprocessid 6511 --telemetryoptedin false
(dns block)www.bing.com
/usr/lib/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.deps.json /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/testhost.dll --port 41667 --endpoint 127.0.0.1:041667 --role client --parentprocessid 5947 --telemetryoptedin false
(dns block)/usr/lib/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/EssentialCSharp.Web.Tests.deps.json /home/REDACTED/work/EssentialCSharp.Web/EssentialCSharp.Web/EssentialCSharp.Web.Tests/bin/Debug/net8.0/testhost.dll --port 38531 --endpoint 127.0.0.1:038531 --role client --parentprocessid 6511 --telemetryoptedin false
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.