Migrate base URL from archive.sparkpost.com to docs.sparkpost.com#857
Merged
Conversation
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>
✅ Deploy Preview for support-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
viniciusgiles
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Follow-up to #855 (the
support.sparkpost.com→archive.sparkpost.commigration). This moves the site's canonical host todocs.sparkpost.comand 301-redirects the oldarchive.sparkpost.comhost to it. The site staysnoindexso it doesn't compete withbird.comin search — this is a host rename, not a re-indexing.Changes
next-sitemap.js— defaultsiteUrl→https://docs.sparkpost.com.disallow: ['/']kept, so generatedrobots.txtstill emitsDisallow: /;Host/Sitemapand all sitemap URLs now readdocs.sparkpost.com.netlify.tomlfont-src:archive.sparkpost.com→docs.sparkpost.com.X-Robots-Tag = "noindex, nofollow"; refreshed its comment (it referenced the deleted edge function).netlify/edge-functions/host-conditional-noindex.ts— its job was keepingsupport.sparkpost.comindexable during the CloudFront gap; support is now off Netlify. Reverted thetsconfig.jsonnetlifyexclude that existed only for it.components/site/seo.tsxis unchanged — the<meta name="robots" content="noindex, nofollow">stays. Markdown content links untouched, as in #855.Verification
next-sitemaplocally:robots.txt→Disallow: /,Host: https://docs.sparkpost.com,Sitemap: https://docs.sparkpost.com/sitemap.xml; sitemap URLs underdocs.sparkpost.com. ✅Notes / out of scope
archive.sparkpost.comanddocs.sparkpost.com. That setup lives outside the repo; the redirect only fires once both hosts reach this deploy.X-Robots-Tagnow 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.comtodocs.sparkpost.comwhile keeping the docs property noindex (unchangedseo.tsxmeta,X-Robots-Tag, androbots.txtDisallow: /).next-sitemap.jsnow defaultssiteUrltohttps://docs.sparkpost.com, so generated sitemap/robotsHostand URLs point at docs.netlify.tomladds a forced, first host rule:https://archive.sparkpost.com/*→https://docs.sparkpost.com/:splat(301). CSPfont-srcis updated fromarchive.sparkpost.comtodocs.sparkpost.com. TheX-Robots-Tagcomment is rewritten to match the post-migration setup (no host-specific SEO exceptions).Removes
netlify/edge-functions/host-conditional-noindex.ts, which previously keptsupport.sparkpost.comindexable during migration;tsconfig.jsonno longer excludesnetlifynow 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.