n8n Webhook Returns 404: Test URL vs Production URL

Short answer: a 404 from an n8n webhook usually means the webhook is not active in the state you called it, not that it is broken. Every Webhook node has two URLs, and each one only works in one specific state. The error message tells you which state you are missing.

The two webhook URLs

The Webhook node panel shows a Test URL and a Production URL. They differ by one path segment.

URLPathWorks when
Test URL/webhook-test/<webhook-id>You clicked Listen for test event, and only for one call after that
Production URL/webhook/<webhook-id>The workflow is published (active)

This table comes from my own tests below and from the hints in the n8n error messages.

What I tested

I used a self-hosted n8n instance running on an Ubuntu server behind Cloudflare. I created a new workflow with a single Webhook node set to HTTP Method GET, Authentication None and Respond Immediately. Then I called each URL with curl -i and wrote down the status code and the response. I ran the tests in this order: 1, 2, 4, 3, 5, 7, 6.

#Workflow stateRequestResult
1Not published, not listeningGET Test URL404
2After clicking Listen for test eventGET Test URL200, Workflow was started
3After that one call, without clicking Listen againGET Test URL404, same as test 1
4Not publishedGET Production URL404
5PublishedGET Production URL200, Workflow was started
6Published, not listeningGET Test URL404, same as test 1
7PublishedPOST Production URL404, not registered for POST requests

The three 404 messages and what they mean

Test URL called while n8n is not listening (tests 1, 3 and 6):

{"code":404,"message":"The requested webhook \"<webhook-id>\" is not registered.","hint":"Click the 'Execute workflow' button on the canvas, then try again. (In test mode, the webhook only works for one call after you click this button)"}

The Test URL is registered only after you click Listen for test event, and only for one call. Click the button again before each new test call. Publishing the workflow does not make the Test URL work (test 6).

Production URL called before the workflow is published (test 4):

{"code":404,"message":"The requested webhook \"GET <webhook-id>\" is not registered.","hint":"The workflow must be active for a production URL to run successfully. You can activate the workflow using the toggle in the top-right of the editor. Note that unlike test URL calls, production URL calls aren't shown on the canvas (only in the executions list)"}

Publish the workflow, then call the Production URL again. The hint also says production calls are not shown on the canvas, only in the executions list. I did not check the executions list for this post.

Wrong HTTP method (test 7):

{"code":404,"message":"This webhook is not registered for POST requests. Did you mean to make a GET request?"}

The Webhook node was set to GET, so a POST request returned a different 404 message. Change the HTTP Method in the node or in your request so that they match.

How to fix it

  1. Decide which URL you are calling. Use the Test URL while building and the Production URL in production.
  2. For the Test URL, click Listen for test event and send the request. Repeat the click for every new request.
  3. For the Production URL, publish the workflow first.
  4. Check that the HTTP method in your request matches the Webhook node.
  5. Call the URL again with curl -i and read the status code and the message.
curl -i https://your-n8n-domain/webhook/<webhook-id>
curl -i -X POST https://your-n8n-domain/webhook/<webhook-id>

The hints do not always match the screen

The 404 hints refer to an Execute workflow button and an activation toggle. In the n8n interface I used, the matching controls were labeled Listen for test event and Publish. If a hint and your screen use different words, look for the control that does the same job.

Security note

My test webhook had Authentication set to None, so anyone who knows the URL can trigger the workflow. Use authentication on production webhooks, do not post real webhook URLs in public, and remove test workflows when you are done.

What I did not test

  • HTTP methods other than GET and POST
  • Webhook authentication options
  • Other reverse proxy or hosting setups
  • The executions list for production calls

Leave a Comment

Discover more from AI Brief

Subscribe now to keep reading and get access to the full archive.

Continue reading