The user wants a migration plan for deprecating AMP (Accelerated Mobile Pages).
This plan needs to cover four specific areas:
- Parity Checks: Ensuring the non-AMP experience matches the AMP experience.
- Redirects: Handling traffic from AMP URLs (cache and original) to the new non-AMP pages.
- Analytics Continuity: Making sure data tracking remains consistent during the switch.
- CWV (Core Web Vitals): Ensuring performance doesn't drop post-migration.
Target Audience: Developers, SEO specialists, and Product Managers involved in a site migration.
Format: A structured guide or migration plan (likely a checklist or step-by-step process).
Drafting the Content:
-
Introduction: Briefly explain why this is happening (Google prioritizing CWV over AMP status) and the goal (seamless transition without traffic loss).
-
Phase 1: Parity Checks (Functional & Visual)
- AMP is often stripped down. The new page needs to load fast and look right.
- Key elements: Layout (responsive), Functionality (menus, accordions), Ads (crucial for revenue), Dynamic content (comments, live blogs).
- Tools: Visual regression testing, cross-device testing.
-
Phase 2: Technical SEO & Redirects (The "Hard" Part)
- The
rel="amphtml" link: Needs to be removed from the desktop/mobile page.
- The
link rel="canonical": On the AMP page, this usually points to the non-AMP version. Now, the AMP page (if kept temporarily) or the 301 redirect logic must point to the canonical.
- Google AMP Cache URLs: These are tricky (
google.com/amp/...). You can't control them via server config easily. Wait, actually you can.
- The strategy:
- Server-side 301s from
/amp/ paths to the canonical version.
- Handling the
amp-html header removal.
- Updating Structured Data (Schema) to remove AMP-specific requirements if necessary (though
NewsArticle usually just works).
-
Phase 3: Analytics Continuity
- AMP uses
amp-analytics. Non-AMP uses gtag.js or GTM.
- Risk: Data break.
- Mitigation:
- Map dimensions/metrics.
- Custom Dimensions to track "AMP vs. Non-AMP" traffic during transition.
- Ensure Client ID persistence (if possible, though hard across domains/cache).
- Check Ad revenue tracking (AdSense/Ad Manager).
-
Phase 4: Core Web Vitals (CWV) & Performance
- AMP was a crutch for performance. Removing it exposes the raw code.
- LCP (Largest Contentful Paint): Optimize images, server response time (TTFB).
- FID/INP (Interaction to Next Paint): Remove heavy JS blocking the main thread.
- CLS (Cumulative Layout Shift): Reserve space for ads/images (something AMP did automatically).
- Lazy Loading: Implement native lazy loading or IntersectionObserver.
-
Phase 5: The Execution (Go-Live Plan)
- Staggered rollout vs. Big Bang.
- Monitoring (Search Console, Server Logs).
Refining the Structure:
I'll structure this as a "Migration Playbook" with specific code snippets or configuration examples where applicable.
- Self-Correction during drafting: I need to be careful about the "Redirects" part regarding Google Cache. Google usually flushes the cache eventually, but the immediate traffic spike needs handling. The most robust way is a server-side redirect on the
/amp endpoint.
- Clarification on Parity: Parity isn't just visual; it's about feature sets. Did AMP restrict a feature (like a specific widget) that the user now expects? Or vice versa?
Specific Technical Details to include:
- Nginx/Apache redirect rules.
- HTML head changes (
amphtml link removal).
- CSS refactoring (AMP CSS is inlined; now it needs to be external or critical CSS extracted).
Final Polish: Add a summary checklist.
Let's build the response based on these points.
Structure:
- Executive Summary: The "Why" and "How".
- Phase 1: Parity & Feature Audit (The "Clone" Phase)
- Visual/Functional audit.
- CSS migration.
- Ad slot parity.
- Phase 2: Technical Implementation (The "Switch")
- Redirects (Server config).
- Canonicalization updates.
- Header removals.
- Phase 3: Core Web Vitals (The "Speed" Phase)
- Image handling.
- Script optimization.
- Layout stability (Ads).
- Phase 4: Analytics Continuity (The "Data" Phase)
- GTM/GA4 setup.
- Historical comparison tracking.
- Phase 5: Rollout & Monitoring
- Sitemap updates.
- Search Console verification.
This looks solid. I will write it out clearly, using code blocks for technical examples.
This migration plan outlines the transition from AMP (Accelerated Mobile Pages) to a responsive, fast PWA (Progressive Web App) or standard mobile-first site. The goal is to remove AMP dependencies while maintaining search ranking, traffic integrity, and Core Web Vitals (CWV) performance.
AMP Deprecation Migration Playbook
Phase 1: Parity & Feature Audit
Before turning off AMP, you must ensure the new mobile experience is not just a visual match, but a functional replacement.
1. Visual & Functional Parity
- Layout Shift Prevention: AMP enforces strict layout rules. Your new CSS must replicate this to avoid CLS (Cumulative Layout Shift).
- Action: Audit images, ads, and embeds. Ensure explicit
width and height attributes are set on all media to reserve space during load.
- Dynamic Content: Check if AMP pages used dynamic components (e.g.,
amp-live-list, amp-form).
- Action: Replace
amp-form with standard HTML forms + AJAX validation. Replace amp-live-list with a JavaScript-based polling mechanism or WebSockets.
- Ad Saturation: AMP often limits ad density.
- Action: Ensure the new template doesn't accidentally insert more ads than the AMP version, which could hurt CWV and user trust.
2. CSS Restructuring
- The Constraint: AMP limits CSS to 75KB.
- The Risk: Unconstraining CSS can lead to "CSS bloat," slowing down render times.
- Action: Implement Critical CSS inlining for Above-the-Fold content and load the rest asynchronously.
Phase 2: Technical Migration & Redirects
This is the most critical phase for SEO preservation. You are converting "paired AMP" (canonical + amp) to a "canonical-only" structure.
1. Remove AMP Linking
- The
rel="amphtml" Tag: Your canonical pages currently point to the AMP versions.
- Action: Remove the
<link rel="amphtml" href="..."> tag from the <head> of your canonical pages.
- Timeline: Do this before or simultaneously with the server-side redirects.
2. The Redirect Strategy (Crucial)
You must redirect the /amp/ URLs (or ?amp=1 parameters) to the canonical version to preserve link equity.
- Nginx Example:
location ~ /amp/$ {
rewrite ^(.*)/amp/$ $1 permanent;
}
- Apache (.htaccess) Example:
RewriteEngine On
RewriteRule ^(.*)/amp/?$ $1/ [R=301,L]
- Logic: The AMP URL
example.com/blog/post/amp/ must 301 redirect to example.com/blog/post/.
3. Search Console Cleanup
- Action: After deployment, go to Google Search Console.
- Check: Look for a spike in "Excluded" pages under the Index Coverage report.
- Validate: Use the URL Inspection tool on an old AMP URL to confirm Google sees the 301 redirect and indexes the canonical destination.
Phase 3: Analytics Continuity
Breaking AMP pages often breaks historical data comparison if User IDs or session stitching fails.
1. Migration from amp-analytics
AMP uses a specific JSON configuration for analytics. You must replace this with the standard JavaScript tracker (e.g., gtag.js, GA4, Adobe).
- Client ID Continuity:
- AMP stores the Client ID in a specific cookie or local storage.
- Standard web uses
_ga cookies.
- Action: Configure your new analytics implementation to look for the AMP Client ID first to bridge the session history (if technically feasible), or accept a "new user" count spike on migration day.
2. Server-Side Analytics (The Solution)
To avoid client-side discrepancies entirely:
- Action: Implement Server-Side Tagging (e.g., Google Tag Manager Server-Side).
- Benefit: The server processes the hit regardless of whether the user is on AMP or Standard HTML, ensuring data parity during the switch.
3. Event Mapping
- Action: Create a mapping doc.
amp-analytics event scroll -> New JS event scroll_depth.
amp-analytics event click -> New JS event anchor_click.
- Ensure Custom Dimensions (e.g., "Page Type," "Author") are passed identically in the new payload.
Phase 4: Core Web Vitals (CWV) Defense
AMP is fast by default; your new site is fast by design. You must strictly monitor CWV to prevent a ranking drop.
1. LCP (Largest Contentful Paint)
- Goal: < 2.5s.
- AMP Mechanism: Pre-rendering and optimized CDNs.
- Migration Fix:
- Implement
loading="eager" for the Hero image.
- Use
fetchpriority="high" on the Hero image tag.
- Ensure the server uses Brotli or Gzip compression.
2. INP (Interaction to Next Paint)
- Goal: < 200ms.
- AMP Mechanism: Heavy JS is deferred/blocked.
- Migration Fix:
- Audit third-party scripts (Chat widgets, Tag Managers). They destroy INP.
- Use
requestIdleCallback for non-essential JS execution.
- Ensure ad scripts do not block the main thread for long.
3. CLS (Cumulative Layout Shift)
- Goal: < 0.1.
- AMP Mechanism: Static layout engine.
- Migration Fix:
- Fonts: Use
font-display: optional or block to prevent FOUT (Flash of Unstyled Text).
- Ads: The most common cause of CLS. Create a fixed-size container for ads. If the ad doesn't fill it, leave the space empty (don't collapse) to prevent layout jumps.
Phase 5: The Rollout Checklist
- Staging Test: Deploy the non-AMP site to a staging environment. Verify 301 redirects work (check headers).
- Analytics Test: Verify events are firing on the non-AMP version using the Google Tag Assistant or GA4 DebugView.
- The Switch:
- Push code to remove
rel="amphtml" from canonical pages.
- Enable 301 Redirects on the load balancer/server.
- Update Sitemap.xml to remove AMP URLs (or let redirects handle it naturally).
- Monitoring (Day 0-7):
- Rigor: Set up uptime and speed monitoring (Lighthouse CI or SpeedCurve).
- SEO: Monitor Search Console for "Page with redirect" errors.
- Revenue: Compare RPM (Revenue Per Mille) to ensure ad performance hasn't dropped due to lazy-loading issues.