You search Google for your branded content and the SERP shows your-app.vercel.app or your-site.web.app URLs instead of yourdomain.com. Click through — same content. The platform URL got indexed before you added a custom domain, and Google never naturally migrated. Custom domain doesn’t “win” automatically — you need to either redirect platform URL to custom domain, or noindex the platform URL, or set canonical pointing to custom domain. Without one of these explicit signals, Google may keep showing the platform URL especially for older indexed pages.
Common causes
Ordered by hit rate, highest first.
1. Launched on platform URL, added custom domain later
The most common pattern: you deployed to app.vercel.app, got some links/traffic, then added the custom domain. Vercel serves both. Google had already indexed the platform URL.
How to spot it: site:your-app.vercel.app on Google. If indexed pages appear, you’re seeing this.
2. No canonical pointing to custom domain
Pages don’t have <link rel="canonical" href="https://yourdomain.com/...">, or the canonical points to the platform URL.
How to spot it:
curl -s "https://your-app.vercel.app/article" | grep canonical
If canonical points to vercel.app, that’s the bug.
3. Platform URL not redirected to custom domain
Vercel and Firebase serve both URLs. Without explicit redirect, both stay live.
How to spot it:
curl -sI "https://your-app.vercel.app/" | head -3
Returns 200 (not 301) = no redirect set.
4. Preview deployments are indexable
Vercel previews and Netlify deploy previews can be crawled if not blocked. Each preview is a near-duplicate of production.
How to spot it: site:vercel.app with your project name. If preview URLs show, they’re indexed.
5. Firebase web.app cannot be fully disabled
Firebase Hosting serves both your custom domain and a *.web.app URL by design. The web.app stays accessible; the only way to noindex it is via robots.txt or meta tag in your HTML.
How to spot it: site:web.app yoursite. If results show, web.app is indexed.
6. External backlinks point to platform URL
Even after fixing your side, old backlinks (from blog posts, social media) still point to your-app.vercel.app. Each one feeds the platform URL’s authority.
How to spot it: Ahrefs / Majestic backlink reports. If many backlinks reference the platform URL, you have external persistence.
Shortest path to fix
Step 1: Always emit canonical to custom domain
Every page’s <head> must have:
<link rel="canonical" href="https://yourdomain.com/article-path/" />
Even when served from the platform URL. The canonical tells Google “this is the real URL.”
---
// In your layout
const canonicalUrl = new URL(Astro.url.pathname, 'https://yourdomain.com').toString();
---
<link rel="canonical" href={canonicalUrl} />
Step 2: Redirect platform URL to custom domain
Vercel — Domain settings → set custom domain as primary → toggle “redirect to” for the platform URL.
In code (more reliable):
// astro.config.mjs or middleware
export default defineConfig({
site: 'https://yourdomain.com',
// Astro can serve assets correctly; for redirects use middleware or vercel.json
});
vercel.json:
{
"redirects": [
{
"source": "/:path*",
"has": [{ "type": "host", "value": "your-app.vercel.app" }],
"destination": "https://yourdomain.com/:path*",
"permanent": true
}
]
}
Netlify — Domain management → set custom as primary. Netlify auto-redirects platform *.netlify.app to it.
Firebase web.app — Can’t fully disable but can robots.txt block crawl:
Use a server-side check to emit noindex when served from web.app domain:
{Astro.url.hostname.endsWith('.web.app') && (
<meta name="robots" content="noindex" />
)}
Step 3: Noindex preview deployments
vercel.json:
{
"headers": [
{
"source": "/(.*)",
"has": [{ "type": "host", "value": "(?!yourdomain\\.com).*" }],
"headers": [{ "key": "X-Robots-Tag", "value": "noindex" }]
}
]
}
This emits X-Robots-Tag: noindex for any request not from your canonical domain.
Step 4: Submit canonical URLs in Search Console
For each indexed platform URL, in Search Console → URL Inspection → enter the custom domain URL → “Request Indexing.”
Don’t add the platform URL as a separate property; that would tell Google to track it as a separate site.
Step 5: Remove old GSC property for platform URL (if exists)
If you added https://your-app.vercel.app/ as a Search Console property when you first launched, remove it. Don’t delete data (export first if needed), but stop adding to its history.
Step 6: Wait for consolidation
Google de-indexes the platform URL gradually. site:your-app.vercel.app results should reduce over 2-8 weeks.
When this is not on you
Some platforms (Firebase) make it impossible to fully disable the platform URL. Workarounds exist (noindex via meta tag) but aren’t as clean as a hard 301.
Easy to misdiagnose as
People assume the custom domain “wins” automatically once added. Google needs explicit signals: canonical link tag, 301 redirect, or noindex on the platform URL.
Prevention
- From day one of any new project: noindex platform URLs in production, redirect to custom domain.
- Set canonical tag to custom domain in all page templates, regardless of which URL serves the request.
- Don’t verify platform URLs in Search Console as separate properties.
- Configure preview/staging environments to noindex via X-Robots-Tag header.
- Audit
site:platform-urlquarterly to catch new indexed pages early.
FAQ
- Can I disable the platform URL entirely? Varies by platform. Vercel allows binding-only behavior. Firebase web.app stays accessible by design.
- Will Google figure it out eventually? Slowly and unreliably. Explicit signals (canonical, 301, noindex) are far faster.