Free auditStart free
GuideError · HTTP status codes

504 Gateway Timeout

A 504 Gateway Timeout means a proxy or CDN waited too long for the server behind it. See who causes it and how to fix it in nginx, Apache and CDNs.

4 min
read
8
sources
Oct 21, 2026
updated
Scaplet Editorial Team
author
The short answer

A 504 Gateway Timeout means a server acting as a gateway or proxy, such as nginx or a CDN, did not get a response in time from the upstream server it needed. The slow or unreachable part is behind the proxy, not your device. Visitors can retry; owners should find what is slow or blocked between the proxy and the origin.

  1. What a 504 means and who causes it
  2. How to get past a 504 as a visitor
  3. How to find the cause as a site owner
  4. What it does to SEO
30-second check

Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode
02How it works

How to get past a 504 as a visitor

  1. 1

    Wait and reload

    If the origin is slow because of a traffic spike or a long task, a retry a little later may work. MDN says the site "may work again at a later time".

  2. 2

    Check whether it is only you

    MDN names client networking errors as the exception, particularly if the service works for other visitors and if clients use VPNs or other custom networking setups. Try another network or turn the VPN off.

  3. 3

    Avoid repeating a payment or form submission

    A 504 does not tell you whether the origin finished the work after the proxy stopped waiting. Check your account or email for the result before submitting again.

04Explained

What it does to SEO

Google handles a 504 like other 5xx errors. Its crawlers temporarily slow down, content received from those URLs is ignored, and already indexed URLs are preserved but eventually dropped. Once the server starts responding with a 2xx status code again, Google gradually increases the crawl rate. See 5xx server errors and Google's documentation on how HTTP status codes affect its crawlers.
Sources · 8

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • rfc-editor.org
  • mozilla.org
  • amazon.com
  • cloudflare.com
  • nginx.org
  • apache.org
  • google.com
  1. 01RFC 9110: HTTP Semanticsrfc-editor.org · checked 2026-10-25
  2. 02MDN: 504 Gateway Timeoutdeveloper.mozilla.org · checked 2026-10-25
  3. 03Amazon CloudFront: HTTP 504 status code (Gateway Timeout)docs.aws.amazon.com · checked 2026-10-25
  4. 04Cloudflare: Error 524developers.cloudflare.com · checked 2026-10-25
  5. 05nginx: ngx_http_proxy_modulenginx.org · checked 2026-10-25
  6. 06nginx: ngx_http_fastcgi_modulenginx.org · checked 2026-10-25
  7. 07Apache HTTP Server: mod_proxyhttpd.apache.org · checked 2026-10-25
  8. 08How HTTP status codes affect Google's crawlersdevelopers.google.com · checked 2026-10-25
Questions

Asked a lot.

4 questions people ask next, answered from the sources on this page.

01How do I fix a 504 gateway timeout?

Find out whether the origin is slow or unreachable. Time a direct request to it. If it is slow, fix the query or job and only then raise the proxy timeout. If it cannot be reached, check firewalls, security groups and DNS between the proxy and the origin.

02Is a 504 error my fault?

Usually not. The proxy waited for an upstream server and did not get a response in time. The exception is your own network: MDN says VPN, firewall, proxy and DNS settings can cause it when the site works for other visitors.

03Does a 504 mean the website is down?

Not necessarily. The proxy is answering, but a server behind it is slow or unreachable. Other pages that do not depend on that server may still work, and the site may work again later.

04What is the difference between 504 and 408?

A 504 is the gateway telling you the upstream server was too slow to answer it. A 408 is a server telling a client that it did not receive a complete request in time. See 408 Request Timeout.

Free · 2 minutes

Tools point. Agencies advise. This one ships.

Run the free audit, then approve the fixes. Every change can be undone.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane