From cb7cc9303652c1f98025078ff0912a4fabcbef87 Mon Sep 17 00:00:00 2001 From: Juan Ibarlucea Date: Fri, 12 Jun 2026 21:19:43 -0300 Subject: [PATCH] fix(seo): redirect stale squareup auth link + defer contact-us support email Follow-up cleanup after the MARTECH-19 re-crawl (health 95, errors 143->39): - Redirect /:locale/references/auth-providers/squareup -> .../square. An external/stale link to the old "squareup" slug 404'd; this clears the "broken redirect" plus its 404/4XX rows. - The contact-us "Email Support" card now assembles its mailto after mount (mirrors ), so SSR markup is a plain contact-page link and Cloudflare can't rewrite it into a broken /cdn-cgi/l/email-protection link. Co-Authored-By: Claude Opus 4.8 --- app/en/resources/contact-us/contact-cards.tsx | 12 ++++++++++-- next.config.ts | 7 +++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/en/resources/contact-us/contact-cards.tsx b/app/en/resources/contact-us/contact-cards.tsx index 9e2e720a9..1c4cd5ad1 100644 --- a/app/en/resources/contact-us/contact-cards.tsx +++ b/app/en/resources/contact-us/contact-cards.tsx @@ -20,7 +20,7 @@ import { Users, } from "lucide-react"; import posthog from "posthog-js"; -import { useState } from "react"; +import { useEffect, useState } from "react"; import { useForm } from "react-hook-form"; import { QuickStartCard } from "../../../_components/quick-start-card"; @@ -264,6 +264,14 @@ function SuccessMessage({ onClose }: { onClose: () => void }) { export function ContactCards() { const [isSalesModalOpen, setIsSalesModalOpen] = useState(false); const [isSubmitted, setIsSubmitted] = useState(false); + // Assemble the support mailto only after mount so the SSR/crawled markup + // shows a plain contact-page link — Cloudflare's email obfuscation then has + // nothing to rewrite into a broken /cdn-cgi/l/email-protection link. Mirrors + // (see app/_components/contact-email.tsx). + const [supportHref, setSupportHref] = useState("/en/resources/contact-us"); + useEffect(() => { + setSupportHref("mailto:support@arcade.dev"); + }, []); const handleContactSalesClick = () => { posthog.capture("Contact sales modal opened", { @@ -282,7 +290,7 @@ export function ContactCards() {
diff --git a/next.config.ts b/next.config.ts index c0c5b2062..c3347c3d6 100644 --- a/next.config.ts +++ b/next.config.ts @@ -31,6 +31,13 @@ const nextConfig: NextConfig = withLlmsTxt({ destination: "/:locale/resources/integrations", permanent: true, }, + // The auth provider is "square"; an external/stale link points at the + // old "squareup" slug, which 404s. Send it to the real page. + { + source: "/:locale/references/auth-providers/squareup", + destination: "/:locale/references/auth-providers/square", + permanent: true, + }, // Dissolved guides/security section { source: "/:locale/guides/security/security-research-program",