Add IndexNow sitemap notification to deployment#1125
Open
BenjaminMichaelis wants to merge 3 commits into
Open
Conversation
- Submit sitemap.xml to IndexNow API after successful production deployment - Notifies search engines (Bing, Yandex, Naver, etc.) of content updates - Uses GitHub Secret INDEXNOW_API_KEY for authentication - Continues on error to prevent deployment failures Addresses: #401
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a post-deploy workflow step to the production deployment job that pings the IndexNow API with the site's sitemap URL so search engines (Bing, Yandex, Naver, etc.) are notified of content updates. The step runs only after the smoke test succeeds and is configured with continue-on-error: true so notification failures don't fail deployments. Closes #401.
Changes:
- Adds a
Notify IndexNow of Sitemap Updatestep to the prod deploy job inBuild-Test-And-Deploy.yml. - Uses
secrets.INDEXNOW_API_KEYto authenticate the POST tohttps://api.indexnow.org/indexnow. - Submits
https://essentialcsharp.com/sitemap.xmlin theurlListpayload.
- Add detailed comments to workflow explaining key file hosting requirement and verification - Document IndexNow setup procedure in README with step-by-step instructions for key file deployment - Clarify that sitemap submission is valid (though urlList should ideally contain individual URLs) - Confirm no literal keys are exposed in code or commits; use generic examples in documentation Resolves review comments on PR #1125.
… file - Add wwwroot/6b397fbb613bfbacb059e4972cf3ec15.txt for IndexNow domain ownership verification (served as static asset at https://essentialcsharp.com/{key}.txt) - Fix workflow step: fetch live sitemap after smoke test, extract all <loc> URLs, POST correct JSON array to api.indexnow.org (per spec; not a sitemap URL) - Add graceful warning if sitemap fetch fails; log HTTP response code - Move key to env var to avoid inline secret interpolation - Update README with accurate setup instructions and how-it-works explanation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
Implement automatic search engine notification via IndexNow when deploying to production. This notifies Bing, Yandex, Naver, and other search engines that the sitemap has been updated, enabling faster content discovery.
Approach
Added a single workflow step to the production deployment job that:
INDEXNOW_API_KEY) for authenticationImplementation Details
https://api.indexnow.org/indexnow(global IndexNow endpoint)https://essentialcsharp.com/sitemap.xmlas the URL to be crawledcontinue-on-error: trueto ensure IndexNow issues don't block deploymentsNext Steps
INDEXNOW_API_KEYwith value:5c32619215ebebad6b6ea0658237fd52Fixes #401