POST /api/domain/mark-step-complete/
Marks a connection step as complete after Entri confirms DNS records were added successfully.Purpose
This endpoint is called by the frontend after Entri confirms successful DNS configuration:- Step 1: SSL CNAME added β status becomes
SSL_VALIDATING - Step 2: www CNAME switched β status becomes
DEPLOYED+ triggers background tasks
Architecture
Internal Services
_background_acm_upgrade
Upgrades from Letβs Encrypt certificate to ACM-native certificate for auto-renewal. Triggered: After Step 2 completes (60 second delay) Location:src/app/apis/domain/mark_step_complete/routes.py
_background_google_verify_and_submit
Orchestrates Google verification polling, then triggers search engine submissions. Triggered: After Step 2 completes Flow:- Poll Google verification every 10 seconds for 2 minutes (12 attempts)
- Once verified β update DB status to βVERIFIEDβ
- Add site to Google Search Console
- Run IndexNow submission (always, regardless of Google verification)
- Run GSC sitemap submission (only if Google verified)
src/app/apis/domain/mark_step_complete/routes.py
_background_indexnow_submission
Submits all AI site URLs to IndexNow for search engine indexing. Triggered: By_background_google_verify_and_submit after polling completes
Location: src/app/apis/domain/mark_step_complete/routes.py
_background_gsc_submission
Submits sitemap to Google Search Console. Triggered: By_background_google_verify_and_submit only if Google verification succeeds
Location: src/app/apis/domain/mark_step_complete/routes.py
Request Body
| Field | Type | Description |
|---|---|---|
step | integer | 1 or 2 |
Response Fields
| Field | Type | Description |
|---|---|---|
status | string | βsuccessβ |
proxy_status | string | New status (SSL_VALIDATING or DEPLOYED) |
Background Task Details
ACM Upgrade
- Waits 60 seconds before starting
- Requests new ACM certificate with DNS validation
- ACM certificates auto-renew (unlike Letβs Encrypt)
- User doesnβt wait for this
Google Verification + Search Engine Submission
- Polls Google verification every 10 seconds for up to 2 minutes
- This gives DNS time to propagate after user adds TXT record in Step 1
- IndexNow runs regardless of Google verification result
- GSC sitemap only submits if Google verification succeeds
Why Poll in Step 2?
The Google TXT record is added during Step 1 (via Entri), but verification is checked in Step 2 because:- DNS Propagation Time: TXT records need time to propagate globally
- More Time: By Step 2, the TXT record has had time to propagate
- Resilience: Polling handles slow DNS propagation gracefully
- Non-blocking: User doesnβt wait - it runs in background