Skip to content

Migrate base URL from archive.sparkpost.com to docs.sparkpost.com#857

Merged
PauloJeunonSousa merged 1 commit into
mainfrom
migrate-to-docs-sparkpost
Jul 2, 2026
Merged

Migrate base URL from archive.sparkpost.com to docs.sparkpost.com#857
PauloJeunonSousa merged 1 commit into
mainfrom
migrate-to-docs-sparkpost

Conversation

@PauloJeunonSousa

@PauloJeunonSousa PauloJeunonSousa commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Context

Follow-up to #855 (the support.sparkpost.comarchive.sparkpost.com migration). This moves the site's canonical host to docs.sparkpost.com and 301-redirects the old archive.sparkpost.com host to it. The site stays noindex so it doesn't compete with bird.com in search — this is a host rename, not a re-indexing.

Changes

  • next-sitemap.js — default siteUrlhttps://docs.sparkpost.com. disallow: ['/'] kept, so generated robots.txt still emits Disallow: /; Host/Sitemap and all sitemap URLs now read docs.sparkpost.com.
  • netlify.toml
    • Added a forced host-based 301 as the first redirect rule so archive traffic lands on docs before any path rule fires:
      [[redirects]]
        from = "https://archive.sparkpost.com/*"
        to = "https://docs.sparkpost.com/:splat"
        status = 301
        force = true
    • CSP font-src: archive.sparkpost.comdocs.sparkpost.com.
    • Kept X-Robots-Tag = "noindex, nofollow"; refreshed its comment (it referenced the deleted edge function).
  • Removed netlify/edge-functions/host-conditional-noindex.ts — its job was keeping support.sparkpost.com indexable during the CloudFront gap; support is now off Netlify. Reverted the tsconfig.json netlify exclude that existed only for it.

components/site/seo.tsx is unchanged — the <meta name="robots" content="noindex, nofollow"> stays. Markdown content links untouched, as in #855.

Verification

  • Ran next-sitemap locally: robots.txtDisallow: /, Host: https://docs.sparkpost.com, Sitemap: https://docs.sparkpost.com/sitemap.xml; sitemap URLs under docs.sparkpost.com. ✅

Notes / out of scope

  • Assumes this Netlify deploy is configured (domain aliases + DNS) to serve both archive.sparkpost.com and docs.sparkpost.com. That setup lives outside the repo; the redirect only fires once both hosts reach this deploy.
  • X-Robots-Tag now applies to every host with no carve-out (the edge function is gone). Correct given docs is meant to stay noindex and support is off Netlify.

🤖 Generated with Claude Code


Note

Medium Risk
Host-level 301s and global noindex headers affect all traffic and SEO signals; misconfigured DNS or redirect ordering could break archive links or indexing expectations.

Overview
Renames the site’s canonical host from archive.sparkpost.com to docs.sparkpost.com while keeping the docs property noindex (unchanged seo.tsx meta, X-Robots-Tag, and robots.txt Disallow: /).

next-sitemap.js now defaults siteUrl to https://docs.sparkpost.com, so generated sitemap/robots Host and URLs point at docs.

netlify.toml adds a forced, first host rule: https://archive.sparkpost.com/*https://docs.sparkpost.com/:splat (301). CSP font-src is updated from archive.sparkpost.com to docs.sparkpost.com. The X-Robots-Tag comment is rewritten to match the post-migration setup (no host-specific SEO exceptions).

Removes netlify/edge-functions/host-conditional-noindex.ts, which previously kept support.sparkpost.com indexable during migration; tsconfig.json no longer excludes netlify now that the edge function is gone.

Reviewed by Cursor Bugbot for commit 8a24dd2. Bugbot is set up for automated code reviews on this repo. Configure here.

Renames the site's canonical host to docs.sparkpost.com and 301-redirects
the old archive.sparkpost.com host to it, while keeping the site noindex so
it doesn't compete with bird.com in search.

- next-sitemap.js: default siteUrl -> docs.sparkpost.com (robots.txt keeps
  Disallow: /; sitemap/Host now emit docs.sparkpost.com)
- netlify.toml: add forced host-based 301 archive.sparkpost.com/* ->
  docs.sparkpost.com/:splat as the first redirect rule; point CSP font-src at
  docs.sparkpost.com; refresh the X-Robots-Tag comment
- Remove the temporary host-conditional-noindex edge function (support.sparkpost.com
  is now off Netlify via the CloudFront cutover) and revert the tsconfig.json
  netlify exclude it required

noindex stays intact at all three layers (robots.txt, <meta robots>, X-Robots-Tag).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@netlify

netlify Bot commented Jul 2, 2026

Copy link
Copy Markdown

Deploy Preview for support-docs ready!

Name Link
🔨 Latest commit 8a24dd2
🔍 Latest deploy log https://app.netlify.com/projects/support-docs/deploys/6a46a9d863f2cd0008367f07
😎 Deploy Preview https://deploy-preview-857--support-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@PauloJeunonSousa PauloJeunonSousa merged commit f1623e8 into main Jul 2, 2026
6 of 7 checks passed
@PauloJeunonSousa PauloJeunonSousa deleted the migrate-to-docs-sparkpost branch July 2, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants