# Oktavia Search And Webmaster Setup

Canonical URL: https://oktavia.app/docs/oktavia-search-webmaster-setup.md

This document defines the operational setup for search engine verification, sitemap submission and production validation.

## Production URLs

- Public site: `https://oktavia.app`
- Canonical host: `https://oktavia.app`
- WWW redirect target: `https://oktavia.app`
- Sitemap: `https://oktavia.app/sitemap.xml`
- Robots: `https://oktavia.app/robots.txt`
- IndexNow key file: `https://oktavia.app/00e9d567deeea90d326fa6b7f624933c.txt`

## Vercel Environment Variables

Use these variables in the `oktavia-web` Vercel project.

| Variable | Purpose |
| --- | --- |
| `OKTAVIA_API_BASE_URL` | Public API base URL, usually `https://api.oktavia.app`. |
| `OKTAVIA_GOOGLE_MAPS_API_KEY` | Google Maps JavaScript and Places key for public/browser use. |
| `OKTAVIA_GA_MEASUREMENT_ID` | GA4 measurement id, for example `G-XXXXXXXXXX`. |
| `OKTAVIA_GTM_ID` | Optional Google Tag Manager container id, for example `GTM-XXXXXXX`. |
| `OKTAVIA_GOOGLE_SITE_VERIFICATION` | Search Console verification token used in `<meta name="google-site-verification">`. |
| `OKTAVIA_BING_SITE_VERIFICATION` | Bing Webmaster verification token used in `<meta name="msvalidate.01">`. |
| `OKTAVIA_ANALYTICS_DEBUG` | Set to `true` only when debugging analytics events. |

After changing any variable, redeploy the affected Vercel environment.

## Google Search Console

1. Add property for `https://oktavia.app`.
2. Prefer DNS verification when available.
3. If using HTML meta verification, copy only the token value into `OKTAVIA_GOOGLE_SITE_VERIFICATION`.
4. Redeploy production.
5. Verify that the page source or rendered head contains:
   - `meta name="google-site-verification"`
6. Submit `https://oktavia.app/sitemap.xml`.
7. Inspect these URLs:
   - `https://oktavia.app/`
   - `https://oktavia.app/pricing`
   - `https://oktavia.app/onboarding`
   - `https://oktavia.app/recursos/checklist-inspeccion-laboral-hosteleria`

## Bing Webmaster Tools

1. Add property for `https://oktavia.app`.
2. Import from Google Search Console when possible.
3. If using meta verification, copy only the token value into `OKTAVIA_BING_SITE_VERIFICATION`.
4. Redeploy production.
5. Verify that the rendered head contains:
   - `meta name="msvalidate.01"`
6. Submit `https://oktavia.app/sitemap.xml`.
7. Use IndexNow after relevant public page changes:
   - `npm run seo:indexnow -- --all`

## Production Validation Checklist

- `https://oktavia.app/robots.txt` returns `200`.
- `https://oktavia.app/sitemap.xml` returns `200`.
- Public marketing pages return the expected title and canonical.
- Private app routes render `noindex,nofollow`.
- `https://www.oktavia.app` redirects to `https://oktavia.app`.
- GA4 realtime receives a page view after visiting the landing.
- CTA clicks appear as analytics events.
- Lead magnet form creates an internal lead and sends delivery email.
- Google Search Console sitemap is submitted.
- Bing Webmaster sitemap is submitted.
- IndexNow key file is reachable.

## Notes

Verification tokens are public by design. API keys, webhook secrets, R2 credentials and Stripe secrets must never be placed in this document or in browser runtime configuration.
