A visitor opens your website, watches the page load for a long time and then gets “504 Gateway Timeout” instead of your homepage, your shop or your contact form. It often goes wrong on the pages that do the most work: search, checkout, a quote request. The visitor did nothing wrong, and anyone who still sees nothing after half a minute usually leaves.
The short answer: a 504 Gateway Timeout error means a server in between, such as a proxy, a load balancer or a content delivery network (CDN), asked your website's server for a page and had to wait too long for the answer. It gave up and showed the error. If you only want the short definition, read what 504 Gateway Timeout means. This guide explains what it means for your business, the causes in plain words, what you can test yourself in 10 minutes and when to call your host.
What a 504 Gateway Timeout means for your website
Many websites do not answer visitors from one single server. A front server receives the request and passes it on to the server or program that builds the page. That front server waits a fixed time for the answer, often half a minute to a minute. If the answer does not arrive within that time, it stops waiting and sends the visitor a 504.
You will see the error written in different ways, depending on the server and the browser:
- 504 Gateway Timeout or 504 Gateway Time-out, sometimes with “nginx” or another server name below it
- HTTP Error 504 or Error 504
- Gateway Timeout Error
- “The server didn’t respond in time”
- A page that loads for a long time and then shows a short error message
They all mean the same thing: the server behind your website is slow or stuck, not the visitor's phone or computer. For a small business you notice this straight away. An order, a booking or a request that gets stuck halfway never reaches you, and the visitor often does not know whether it went through.
504, 502, 503 or 500: which error do you have?
These server errors look alike, but each one points to a different part of the chain:
- 504 Gateway Timeout: the server in between did connect, but the answer did not come in time.
- 502 Bad Gateway: the server in between got no valid answer, for example because the server behind it crashed or restarted. See how to fix a 502 Bad Gateway error.
- 503 Service Unavailable: the server is running but is not taking requests right now, usually because of maintenance or too many visitors. Read what 503 Service Unavailable means.
- 500 Internal Server Error: the server that builds the page ran into a problem it could not handle, often a bug or a broken plugin. See how to fix a 500 internal server error.
The difference between a 502 and a 504 helps you search: with a 502 something is broken or down, with a 504 something is too slow. If the two take turns, the server is probably overloaded and now and then stops completely.
The causes of a 504 error in plain words
A page that does too much work
Some pages have to look up a lot before they are ready: a search result in a large product catalogue, an overview of hundreds of orders, an export or a report. If that work takes longer than the front server is willing to wait, the visitor gets a 504 while the rest of the site works fine. A database that responds slowly has the same effect.
Too many visitors or too little server capacity
A newsletter, an ad, a mention on social media or a wave of bots can bring many visitors at once. A small hosting plan then runs short of memory or computing power, requests queue up and some are not finished in time. Errors that come at busy moments and then disappear again point to this cause.
An outside service that does not answer in time
Your website often talks to other systems: a payment provider, a link with your accounting or stock, a shipping company, a plugin that fetches data from another server. If your page waits for such a service and it responds slowly, the visitor waits too, until the front server gives up.
A CDN or security service that waits too long for your server
If a CDN or security service sits in front of your website, it shows the 504 when your own server does not answer in time. That happens when your server is overloaded, but also when a firewall on your server slows down or ignores the requests from that service.
A move to new hosting or a DNS change
After a move to another host, or a change to your domain's DNS records, part of the internet keeps sending visitors to the old address for a while. If that old address no longer responds, the request hangs until the time runs out. DNS changes can take 24 to 48 hours to spread.
A recent change or an outage at your host
A new plugin, an update or a new piece of custom code can suddenly make a page much slower. If the error started right after a change, that change is your first suspect. If nothing changed on your side, it can also be an outage or maintenance at your host or CDN.
What you can test yourself in 10 minutes
Work through these checks in order. The first ones take a minute and need no access to anything; for the later ones you need your hosting account.
- Wait a minute and reload the page. A short peak of visitors or a server that was stuck for a moment causes many 504 errors that pass by themselves. If the page works again, keep an eye on it.
- Open it in a private window and on your phone over mobile data. If it works there, the problem is close to you: turn off a VPN and try again. If it fails everywhere, the problem is on the server side.
- See which pages show the error. Open the homepage, an ordinary page and the heavy parts: search, the shop, checkout, the booking form. If only the heavy pages fail, that work is too slow. If the whole site fails, it is the server, the hosting or a CDN.
- Check your host's status page, and your CDN's if you use one. If they report an outage or maintenance, there is nothing to fix on your side: wait until it is over and check again afterwards.
- Undo the last change. Think of a plugin you installed, an update or a piece of code. Roll it back or restore the backup from just before, and test again.
- Switch off a link with an outside service for a moment. If only the page that runs a link fails, such as a stock or shipping link, switch it off for a while. If the page works afterwards, that service is too slow and the fix lies with its provider.
- After a move, check your domain's DNS records. Do they point only to the new server? Remove old records that still point to the old server and give the change time to spread.
- Look at your server's limits. Your hosting panel shows how much memory and computing power your site uses. If it is at the limit, stop the heavy task that is running, block unwanted bot traffic or move to a bigger plan.
When to call your host
Contact your host if the error lasts longer than a few minutes, if it keeps coming back, or if after these tests you still do not know where it is. Hosts see the server logs and the slow requests you cannot see, and they can look at your server's waiting time and capacity. A longer waiting time does hide a slow page, but it does not make it faster: also ask which request takes so long. Send them:
- The exact addresses that show the error, and the addresses that still work.
- When it started, with the time zone, and whether it is constant or comes and goes.
- The exact message, preferably with a screenshot, including the server name below it.
- How long the page loads before the error appears.
- Whether you use a CDN, a security service or links with outside services.
- What changed just before and what you already tried.
What a 504 error does to your Google results
A 504 that lasts a few minutes does little harm. If search engines keep running into 5xx errors, they visit your site less often and pages that keep failing can drop out of the results until they work again. A page that does not quite fail but is very slow also costs you visitors. Fix the cause first, then check your pages in Google Search Console. Also read how to handle website downtime. Website monitoring tells you when your site shows errors, before your customers notice.
How WEMASY keeps 504 errors off your website
With a WEMASY website, hosting and publishing are part of the platform. There is no server, PHP service or waiting time you have to set up or restart yourself, and the servers are managed for you.
- Your own domain is checked for you. When you connect a domain you bought elsewhere, WEMASY shows exactly which DNS records to add and which old ones to remove, such as AAAA records. The DNS status shows Pending, Unverified or Verified and you can click Recheck DNS. See connecting an existing domain.
- A change that broke something can be undone. Every change you, the AI chat or a connected tool makes is kept in your site's history. On the Versions page you go back to what was live before and publish again. See make a version live and roll back.
- Help if the error stays. If your WEMASY website shows a server error for longer than a few minutes, send our support team a ticket with the address and the time. See support tickets.
Frequently asked questions
What does 504 Gateway Timeout mean in plain words?
A server in between, such as a proxy, a load balancer or a CDN, asked your website's server for a page and had to wait too long for the answer. It gave up and showed the error. The problem is on the website's side, not on the visitor's device.
What is the difference between a 502 and a 504 error?
With a 502 the server in between got no valid answer from the server behind it, for example because it crashed. With a 504 it did connect, but the answer did not come in time.
Is a 504 error my fault or my host's?
It can be either. A slow page, a plugin, a link with a slow outside service or a DNS change after a move can cause it. So can an overloaded server or an outage at your host or CDN. If nothing changed on your side, check your host's status page first.
How long does a 504 error last?
Many errors pass by themselves after a few minutes, once a peak of visitors is over. If the error keeps coming back on the same page, that page is too slow and the cause needs to be fixed.
Can a visitor fix a 504 error?
Rarely. Reloading after a minute or turning off a VPN can help. In most cases the fix lies on the website's side.
Does a 504 error hurt my ranking in Google?
A short error does little harm. If search engines keep finding 504 errors, they visit your site less often and can drop the failing pages from the results until they work again.