Search engines
Google Search Console
- Sign in at search.google.com/search-console.
- Add property → URL prefix →
https://morsecodegenerator.com. - Choose "HTML tag" verification.
- Copy the
contentvalue (a long base-64 string). - In Cloudflare Pages, add an environment variable: GOOGLE_SITE_VERIFICATION = the content value.
- Re-deploy. Verify in Search Console.
- Submit sitemap: https://morsecodegenerator.com/sitemap.xml.
Bing Webmaster Tools
- Sign in at bing.com/webmasters.
- Add site → verify with meta tag.
- Set env var BING_SITE_VERIFICATION = the meta content.
- Re-deploy → Verify.
Bing also receives IndexNow submissions automatically — see below.
Yandex Webmaster
- Sign in at webmaster.yandex.com.
- Verify via meta tag.
- Set env var YANDEX_VERIFICATION.
Pinterest (visual / branded card pickup)
- Sign in at pinterest.com/business/claim.
- Verify with meta tag.
- Set env var PINTEREST_VERIFICATION.
Facebook domain verification
- Meta Business Suite → Brand safety → Domains → Add → verify with meta tag.
- Set env var FACEBOOK_DOMAIN_VERIFICATION.
IndexNow (auto-submit changed URLs)
IndexNow is a fast-recrawl protocol shared by Bing, Yandex, Naver, Seznam, and Yep. We submit every sitemap URL after each successful build automatically.
How it works in this repo
- public/<hex>.txt — the IndexNow key file (the file name is the key, the content is the same key). Served at the site root per spec.
- scripts/indexnow-ping.mjs — discovers the key, reads dist/sitemap.xml, POSTs every URL to api.indexnow.org.
- Runs as the final step of npm run build.
When the ping fires
Default-deny. The script only submits when it sees an explicit production signal. Acceptable signals:
- Cloudflare Pages production deploy: CF_PAGES=1 and CF_PAGES_BRANCH=main. Cloudflare sets both automatically on the main-branch build, so production deploys ping without any extra config.
- Maintainer manual opt-in: INDEXNOW_FORCE=1 on a one-off npm run indexnow from your machine.
Everything else (local npm run build, CI checks, Cloudflare preview branches) skips the ping so dev environments don't spam IndexNow. INDEXNOW_DISABLE=1 additionally vetoes the ping if you ever need to stop it mid-incident. The ping never fails the build — IndexNow outages don't block deploys.
To rotate the IndexNow key
- Generate a new random hex string: node -e "console.log(require('crypto').randomBytes(16).toString('hex'))"
- Rename public/<old>.txt → public/<new>.txt and update its content to match the new filename stem.
- Commit, deploy. Bing/Yandex will pick up the new key from the next ping.
Analytics & ads
Google Analytics 4
Loaded after first idle so it never blocks first paint. Tracking ID is hard-coded in src/components/Layout.astro (look for G-1K9JZ9ZQ2L). IP anonymization is on. To move to a new GA property, replace the ID.
Google AdSense
The AdSense loader (ca-pub-7616383336440831) is included in Layout.astro and fires after first idle. Slots are not yet placed; to monetize, drop <ins class="adsbygoogle"> markup at desired positions (end of long-form content, between hub sections — never inside tools).
AI discoverability
- /ai.txt — AI usage policy (allowed, attribution required).
- /llms.txt — structured map of tools / reference / data.
- /llms-full.txt — full machine-readable reference, RAG-ready.
- Robots.txt explicitly allows every major AI bot (GPTBot, ClaudeBot, PerplexityBot, Google-Extended, CCBot, OAI-SearchBot, DeepSeekBot, etc.).
- Rich JSON-LD across every page: Organization, WebSite, SoftwareApplication, BreadcrumbList, DefinedTerm (per Morse character), Dataset (/morse.json), HowTo, FAQ, Course, Article.
PWA / offline
- /manifest.webmanifest — installable.
- /sw.js — service worker with app-shell precache, stale-while-revalidate for HTML, network-first for /morse.json.
- /offline/ — fallback page.
- Cache version is bumped per release (VERSION constant in sw.js) so old caches are purged on activate.
Submission checklist (one-time setup)
- Set Cloudflare Pages env vars: GOOGLE_SITE_VERIFICATION, BING_SITE_VERIFICATION, YANDEX_VERIFICATION, PINTEREST_VERIFICATION, FACEBOOK_DOMAIN_VERIFICATION (only the ones you want).
- Push a deploy. Verify in each console.
- Submit https://morsecodegenerator.com/sitemap.xml in Google Search Console + Bing Webmaster + Yandex Webmaster.
- (Optional) Add the site at marginalia.nu, kagi.com, or other indie engines.
- Confirm IndexNow propagation the next day — Bing should show a "Last detected" date matching your last deploy.