Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Headless CMS API down: how to fix blank page sections

OPS-290High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

A headless CMS (for example Contentful, Sanity, Strapi, Storyblok or Prismic) stores your text, images and page layout and serves them through an API. Your website asks that API for content when a page is built or when a visitor loads it.

If the API is down, rate limited, misconfigured or returns an error, the request fails. The page shell still loads, so the server often answers with a normal 200 status. But the hero, pricing block, testimonials, form or call to action never appear. This is why it is easy to miss: nothing looks like a crash.

How a content API failure empties a page
  1. Visitor opens pageAd click or search result
  2. Site requests contentCall to the CMS API
  3. CMS API failsTimeout, 5xx, 401 or 429
  4. Sections render blankNo headline, form or button
  5. Lead or saleNothing to click or submit

The page loads, but the content request fails, so the sections that matter never render.

Why it costs you leads or sales

Visitors who land on a page with a missing form, price or button have nothing to act on. They leave. If you pay for the traffic, you pay for every one of those visits.

It also hides from normal uptime tools. A simple ping sees a 200 response and reports the site as up. Pages built at request time can fail for a few minutes. Pages that cached a bad build can stay blank until the next deploy.

Form submissions during a content API failureExample numbers
Form submissions during a content API failure (example)Normal day: 40 submissions per day; Day with API failure: 14 submissions per day; After fix: 40 submissions per day01531401440Normal dayDay with API failureAfter fixsubmissions per day

Example: a landing page that normally gets 40 submissions a day, with the form section blank for part of one day.

How to check if your site has it

Check for blank sections
  1. Open key pages in a private window

    Load your landing pages, pricing and contact pages. Look for empty gaps, missing images, forms or buttons.

  2. Open the browser Network tab

    In Chrome, press F12, open Network, reload, and filter by Fetch/XHR. Look for requests to your CMS domain (for example cdn.contentful.com, api.sanity.io or your Strapi URL) with red statuses such as 401, 403, 429, 500 or 504.

  3. Check the Console

    Look for errors such as failed to fetch, CORS errors or undefined values when rendering content.

  4. Check your CMS status page and API keys

    Look at your provider status page, confirm the API token has not expired or been revoked, and check you are not over your API request limit.

  5. Test the API directly

    Call the content endpoint with curl and confirm it returns data quickly.

Test a content API endpoint and timingbash
curl -s -o /dev/null -w "status=%{http_code} time=%{time_total}s\n" "https://YOUR-CMS-API-URL/your-endpoint" -H "Authorization: Bearer YOUR_TOKEN"

How to fix it

The fix has two parts: get the API working again, then make sure a future failure cannot empty the page. The best approach depends on how your site fetches content.

Make content survive an API failure
  1. Pre-build content where you can

    Use static generation or incremental static regeneration (for example in Next.js or Astro) so pages are built from content ahead of time. If the API fails during a rebuild, keep serving the last good page.

  2. Add a timeout and a fallback

    Wrap content requests in a timeout and return default copy, a default form or a link to contact you if the call fails.

  3. Cache the last good response

    Store the last successful response in a CDN, edge cache or file, and serve it with stale-while-revalidate when the API errors.

  4. Fail the build on empty content

    If a required field such as the hero or form is missing, stop the deploy rather than publish a blank page.

Fetch with timeout and fallback contentjavascript
const FALLBACK = { headline: 'Get in touch', ctaUrl: '/contact' };

async function getContent(url, token) {
  const controller = new AbortController();
  const timer = setTimeout(() => controller.abort(), 4000);
  try {
    const res = await fetch(url, {
      headers: { Authorization: 'Bearer ' + token },
      signal: controller.signal
    });
    if (!res.ok) throw new Error('CMS status ' + res.status);
    const data = await res.json();
    if (!data || !data.headline) throw new Error('Empty content');
    return data;
  } catch (err) {
    console.error('Content API failed:', err);
    return FALLBACK;
  } finally {
    clearTimeout(timer);
  }
}
Page behaviour when the API fails

Before

  • Content fetched live on every visit
  • No timeout, no fallback
  • Blank hero, form and button
  • Uptime tool still says the site is up

After

  • Pages pre-built or cached
  • Timeout and default content in place
  • Visitors still see a headline and a way to contact you
  • Failures caught by a check on the real page

How to confirm it's fixed

Confirm the fix
  • Key pages show every section in a private window
  • No red CMS requests in the Network tab
  • The form is visible and a test submission arrives
  • Block the CMS domain in browser dev tools and confirm the fallback content appears
  • Conversion and tracking tags still fire on the page
  • A rebuild with a failing API keeps the last good page live

How to prevent it happening again

Prevention
  • Cache or pre-build content so the live page does not depend on the API on every visit
  • Set timeouts and default content for hero, form and call to action
  • Rotate API tokens on a calendar and keep them out of public code where possible
  • Watch your API request quota and plan limits
  • Subscribe to your CMS provider status updates
  • Re-test key pages after every deploy and content model change
How an unnoticed API failure unfolds
  1. Example: 09:00

    CMS API starts returning 503 errors.

  2. Example: 09:05

    Pages load with blank sections. Uptime ping still reports 200.

  3. Example: 11:30

    Ad spend continues; leads drop with no alert.

  4. Example: 14:00

    Someone spots the empty page by chance.

  5. Example: 14:20

    API recovers, cache cleared, page restored.

How FunnelGuard handles this

FunnelGuard detects this today. A robot visitor runs your real customer journey on a schedule, from the EU or the US. It loads the page like a visitor and checks each step, so if the form, button or section is missing because the content API failed, the step fails.

A failure is re-checked from a second region before one alert goes out, so a brief blip in one place does not create noise. The alert (email, Slack, Teams, WhatsApp, webhook or PagerDuty) includes a screenshot and a likely cause, so you can see the blank section yourself.

FunnelGuard marks its test traffic (utm_source=funnelguard, fg_test=1, an fg_test cookie and its own user agent). It does not bypass CAPTCHAs or bot protection. The Free plan covers 1 site and 2 journeys with daily checks and no card. Paid plans start at $39/month with a 3-day free trial.

Questions people ask

Why is my website showing blank sections?

A common cause on headless sites is a failed content API request. The page loads, but the call to your CMS times out or returns an error, so sections such as the hero, pricing or form render empty. Check the browser Network tab for failing requests to your CMS domain.

How do I know if my headless CMS API is down?

Check your provider's status page, then call the API endpoint with curl and look at the status code and response time. Also open your page with the browser Network tab open and look for red requests to the CMS domain.

Why does my uptime monitor say the site is up when sections are blank?

Basic uptime monitors only check that the server returns a successful status. A headless site can return 200 for the page shell while the content request fails. You need a check that loads the page and confirms the key sections, forms and buttons are really there.

How do I stop blank sections when the CMS API fails?

Pre-build or cache content so the live page does not depend on the API each visit. Add a timeout and default content for key sections, and stop deploys when required content is empty. That way a failure shows fallback content instead of nothing.

Can an expired API token cause blank content?

Yes. An expired, revoked or wrongly scoped token makes the CMS return 401 or 403, and the site gets no content. Check the token in your CMS settings and in your site's environment variables after any change.

Can hitting an API rate limit empty my pages?

Yes. If traffic spikes or too many requests are made per page, the CMS can return 429 errors and content fails to load. Caching responses and building pages ahead of time reduces the number of API calls.

Does FunnelGuard detect blank sections caused by a CMS outage?

Yes. FunnelGuard runs your customer journey on a schedule and checks each step, so a missing form or button fails the check. It re-checks from a second region, then sends one alert with a screenshot and a likely cause.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.