Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Landing page returns 5xx (500, 502, 503, 504): how to fix it

OPS-003High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Every page request gets an HTTP status code. Codes starting with 5 mean the server failed, not the visitor. Your landing page is the page people reach from ads, emails or search, and when it returns a 5xx code, the browser shows an error page or a blank screen instead of your content.

What each 5xx code usually means
CodeNameTypical cause
500Internal Server ErrorCode crash, bad plugin or theme update, broken .htaccess or config file, PHP error
502Bad GatewayA proxy, CDN or load balancer got an invalid reply from the origin server, for example PHP-FPM or the app has crashed
503Service UnavailableServer overloaded, out of workers, or in maintenance mode
504Gateway TimeoutThe origin took too long to answer the proxy or CDN, often a slow database query or external API call

Why it costs you leads or sales

A visitor who lands on an error page cannot see your offer, fill in your form or reach checkout. If you pay for clicks, you still pay for each one. Ad platforms may also lower delivery or disapprove ads whose landing page returns errors. And because the page never loads, your tracking tags never run, so your reports show fewer visits and conversions than you paid for.

Where a 5xx breaks the funnel
  1. Ad clickYou pay for the click
  2. Landing pageServer returns 500/502/503/504
  3. Form or checkoutNever reached
  4. ConversionNo lead, no sale, no tracking hit

The visitor never gets past the first step, so every later step is lost.

Leads per day before and during an outageExample numbers
Leads per day before and during an outage (example)Normal day: 20 leads; Day with 6-hour 5xx: 15 leads; Day with all-day 5xx: 0 leads081520150Normal dayDay with 6-hour 5xxDay with all-day 5xxleads

Example: a page that gets steady ad traffic and normally produces 20 leads a day drops to zero while it returns a 5xx. Numbers are illustrative.

How to check if your site has it

Test the exact URL your ads or emails point to, including any query string. Do not only test the homepage, because a funnel page can fail on its own.

Check the status code
  1. Open the URL in a private window

    This avoids cached pages and logged-in sessions that can hide the problem. Note any error text.

  2. Read the status code

    In Chrome press F12, open the Network tab, reload, and click the first request. The Status shows the code. Or run the command below.

  3. Test from another network

    Try mobile data or a different device. If it fails only for some visitors, see the related guide on intermittent errors.

  4. Note the time and the code

    You will need both to match the error against your server logs.

Show the status code of a pagebash
curl -s -o /dev/null -w "%{http_code}\n" -L https://example.com/landing-page/

How to fix it

Start with what changed. Most 5xx errors begin right after a plugin or theme update, a code deploy, a config edit, a traffic spike or a hosting change. Then use the code to narrow the cause.

Fix a 5xx error
  1. Read the error log

    Check your host's error log (often in the hosting control panel under Logs or Errors), the web server log (for example /var/log/nginx/error.log or the Apache error log) and the application log. The line at the time of the failure usually names the file or process.

  2. For 500: undo the last change

    Roll back the latest plugin, theme or code update. Check for a broken .htaccess file or a PHP syntax error or memory limit message in the log.

  3. For 502: restart the backend

    Restart PHP-FPM or your app process and check it stays up. Confirm your CDN or proxy points to the right origin address and port.

  4. For 503: check load and maintenance mode

    Look for a maintenance mode file or setting left on, exhausted PHP workers or a resource limit on your plan. Add capacity or caching if traffic is the cause.

  5. For 504: find the slow part

    Look for slow database queries or calls to external services that hang. Fix or cache them, and only then consider raising the timeout.

  6. Contact your host if the log shows nothing

    Send them the URL, the code and the exact time. Server-level faults are theirs to fix.

Platform-specific starting points
  1. Turn on debug logging

    In wp-config.php set WP_DEBUG and WP_DEBUG_LOG to true, reload the page, then read wp-content/debug.log. Turn it off afterwards.

  2. Disable plugins

    Rename wp-content/plugins to plugins-off over FTP or the file manager. If the page loads, rename it back and disable plugins one at a time to find the culprit.

  3. Reset .htaccess and check memory

    Rename .htaccess, then save Settings > Permalinks to regenerate it. If the log says memory exhausted, raise the PHP memory limit with your host.

How to confirm it's fixed

Confirm the fix
  • The URL returns 200 (or a single redirect to a 200) with the curl command above
  • The page renders fully in a private window on desktop and mobile
  • The form submits or checkout loads without errors
  • Your analytics and ad tags fire on the page (check in the Network tab or the platform's debug view)
  • The error log shows no new 5xx lines for the page
  • The page still works after 30 minutes and after a cache clear

How to prevent it happening again

Prevention habits
  • Test plugin, theme and code updates on a staging copy before they go live
  • Keep backups and a quick way to roll back
  • Use page caching or a CDN so traffic spikes do not exhaust the server
  • Choose hosting with enough PHP workers and memory for your ad traffic
  • Tell your host or developer before launching a big campaign
  • Set up alerts that check the real landing page URL on a schedule
How a 5xx outage typically unfolds
  1. Example: 09:00

    A plugin update is installed automatically

  2. Example: 09:02

    The landing page starts returning 500

  3. Example: 09:02-15:00

    Ad clicks keep arriving and land on the error

  4. Example: 15:00

    Someone notices and rolls the update back

How FunnelGuard handles this

FunnelGuard detects this issue. A robot visitor loads your landing page on a schedule, from the EU or the US, as the first step of a journey, and flags the run when the page returns a server error instead of loading. Before anything is sent, the failure is re-checked from a second region, so one network blip does not cause a false alarm. You then get one alert by email, Slack, Teams, WhatsApp, webhook or PagerDuty, with a screenshot and a likely cause. The Free plan checks 1 site with 2 journeys daily, and paid plans have a 3-day free trial. Checks run on a schedule, so a very short outage between runs can be missed.

Questions people ask

Why is my landing page showing a 500 internal server error?

A 500 means the server hit an unexpected problem while building the page. Common causes are a faulty plugin or theme update, a PHP error, a broken .htaccess file or a code bug after a deploy. Check the error log for the exact file and line, then undo the latest change.

What is the difference between 502, 503 and 504 errors?

A 502 means a proxy or CDN got a bad reply from your server. A 503 means the server is overloaded or in maintenance mode. A 504 means the server took too long to answer the proxy. All three are server-side failures, not problems with the visitor's device.

How do I fix a 503 service unavailable error on my website?

Check whether maintenance mode was left on, then check whether the server is out of memory, CPU or PHP workers. Restart the app or PHP process, add caching, and upgrade the plan if traffic is the cause. If the log shows nothing, ask your host.

Will a 5xx error hurt my Google Ads or Meta ads?

You still pay for clicks that land on an error, and conversions cannot happen. Ad platforms can also reduce delivery or disapprove ads when the destination page fails. Pause the campaigns until the page works again.

How do I check if my landing page returns a 5xx error?

Open the URL in a private window and look at the Network tab in your browser's developer tools for the status code. You can also run curl with the -w "%{http_code}" option. Test the exact URL your ads use, including parameters.

Why does my page work for me but show 502 or 504 to other people?

You may be seeing a cached copy or be logged in, while visitors reach the origin server directly. The failure may also be intermittent, regional or only happen under load. Test in a private window and from another network, and check the logs at the time visitors saw the error.

Can I get alerted when my landing page returns a 5xx error?

Yes, with a monitoring tool that checks the page on a schedule. FunnelGuard loads your landing page as a robot visitor, re-checks a failure from a second region, and 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.