Internal Services: IndexNow + GSC Submission
After Step 2 of domain connection completes, a background orchestrator handles Google verification and search engine submission:- Google Verification - Polls TXT record verification (10s Γ 12 = 2 min)
- IndexNow - Notifies Bing, Yandex, and other IndexNow-compatible engines
- Google Search Console - Submits sitemap (only if domain is verified)
Purpose
These tasks ensure search engines are immediately notified about the AI site after the proxy is connected. This is one of only TWO places where search engine submission happens:- Here - One-time after domain connection (Step 2)
- BATCH 3 in daily cron - After new content is deployed
Why Poll Google Verification in Step 2?
The Google TXT record is added during Step 1 (alongside the SSL TXT record), but we verify it in Step 2 because:- DNS Propagation: TXT records need time to propagate globally
- More Time: By Step 2, the record has had time to propagate
- Resilience: Polling handles slow DNS gracefully (up to 2 minutes)
- Non-blocking: User doesnβt wait - it runs in background
Function Signatures
Parameters
Google Verify + Submit Orchestrator
| Parameter | Type | Description |
|---|---|---|
ai_site_id | str | AI site database ID |
entity_id | str | Database entity ID |
org_id | str | Clerk organization ID |
source_url | str | Customerβs source URL (e.g., βhttps://example.comβ) |
custom_domain | str | The domain to verify (e.g., βwww.example.comβ) |
google_verification_token | str | Token from Step 1βs start-google-verification |
IndexNow
| Parameter | Type | Description |
|---|---|---|
entity_id | str | Database entity ID |
org_id | str | Clerk organization ID |
source_url | str | Customerβs source URL (e.g., βhttps://example.comβ) |
GSC
| Parameter | Type | Description |
|---|---|---|
ai_site_id | str | AI site database ID |
org_id | str | Clerk organization ID |
source_url | str | Customerβs source URL |
URLs Submitted (IndexNow)
| Category | Source |
|---|---|
| Sitemap URLs | Fetched from deployed AI siteβs sitemap.xml |
/sitemap.xml | Added explicitly (not in sitemap itself) |
| Boosted pages | All paths from boosted_pages.deployment_url |
sitemap.xml from the deployed AI site, parses all <loc> URLs, replaces the AI site domain with the customerβs source domain, and submits to IndexNow.
Execution Flow
Polling Details
| Setting | Value |
|---|---|
| Poll interval | 10 seconds |
| Max attempts | 12 |
| Total timeout | 2 minutes |
| On success | IndexNow + GSC |
| On failure | IndexNow only |
Dependencies
src/app/shared/google_search_console.py-verify_domain(),add_to_search_console(),submit_sitemap()src/app/shared/indexnow.py-submit_urls_to_indexnow()