Webhook error 404

Hello everyone,

I’m experience a strange problem with my n8n installation.

I’m trying to execute a webhook I’ve created but the api is returning me a 404 with a html body.

<html lang="en">

<head>

<meta charset="utf-8">

<title>Error</title>

</head>

<body>

<pre>Cannot POST /webhook/abc123</pre>

</body>

</html>

It does not matter the webhook name or the method, I get the same error.

What makes it stranger is that if I put the webhook in test mode it works without any problem with this url : webhook-test/abc123

At first I thought that it might be a domain name issue but I get the same error just by calling the webhook manually with curl to localhost:5678

My n8n version is the last one and my .env is:

Hey @massimo!

Are you using the Production Webhook URL? If yes, is your workflow active? Also, if you’re making a GET request make sure to select GET from the HTTP Method dropdown list in the Webhook node. I would suggest you go through the Webhook node documentation. Let me know if you still face any issues :slight_smile:

Thank you for your quick response @harshil1712.

The workflow is active and testing with a GET request in production still happens the same.

Hey @massimo! Could it be that the request is POST and the webhook node has GET method set? (or vice-versa) :face_with_monocle:

Hello,

After several updates, currently I have the latest of all, I still have the same problem. The webhook in the test environment responds perfectly, but in the production environment I get a 404 error…

I’ve tried with an old version of n8n (which I’ve had installed for months without updating) and I don’t have this problem. On the same server, I tried installing the latest version and the same thing.

Please, I need your help. Any solution?

Thank you very much in advance,
Massimo

Hey @massimo!

Are your workflows active? Can you try deleting the Webhook node and adding a new one?

Hey @harshil1712,

Thank you for your reply. The workflow is active, if it had not been the POST to the test would not have been executed either, and yes, I have also tried in another workflow totally new and the same problem.

For the Test URL you have to run the workflow manually either by clicking on the Execute Node button or the Execute Workflow button.

However, when your workflow is active (turn on the Active toggle on the top right of the Editor UI), you don’t have to execute the workflow manually. Here’s the playlist that might help you better understand this: https://www.youtube.com/playlist?list=PLlET0GsrLUL5niZQDjW56b_AxpvnEZyps

That is not the problem. I know that I have to manually start the workflow to start the webhook and it responds perfectly when it is a “test”. The problem is, when I send the request to the production URL it doesn’t work, and this didn’t happen in previous versions of n8n. Any solution? Thanks in advance.

Hey @massimo!

I am sure why you’re facing this issue. If it worked in the previous version, it should work for the latest version as well. Can you check if the production Webhook is getting registered in the external service you’re using?

Can you also share how you’re using n8n? Are you self-hosting n8n? If yes, how did you deploy it? Maybe you missed a step while deploying n8n, which is causing this error.