Change N8N Webhook URL: The Easy Method

The beauty of building automation workflows in n8n lies in its flexibility. One such flexible component is the Webhook node, often used to trigger workflows in real-time. However, there are times when you need to change your webhook URL—maybe you're migrating to a new domain or updating your endpoint for security or structural reasons. If you're wondering how to change webhook URL in n8n without breaking your workflows, this guide has you covered.

Whether you're self-hosting or using n8n Cloud, changing the webhook URL is straightforward once you understand the options available.

Understanding Webhook URLs in n8n

Every Webhook node you configure in n8n generates a unique URL. It usually looks like this:

https://yourdomain.com/webhook/{workflow-id}

or in test mode:

https://yourdomain.com/webhook-test/{workflow-id}

These URLs act as triggers, waiting for POST, GET, or other HTTP requests to initiate a workflow. But sometimes, you may want or need to change the structure or endpoint of your existing webhook due to:

  • Domain changes (from localhost to a live URL)
  • Webhook endpoint cleanup
  • Security and obfuscation needs
  • Consolidating multiple workflows

Let’s look at how to safely change your Webhook URL in n8n.

Method 1: Use the Path Field in the Webhook Node

The easiest and most controlled way to change your webhook URL is by manually editing the Path field in the Webhook node configuration.

Step-by-Step Instructions

  1. Open your workflow in n8n.
  2. Locate the Webhook node and click to edit it.
  3. In the node’s settings on the left-hand panel, find the field labeled Path. This is the custom name appended to your base webhook URL.
  4. Change the value to something user-friendly, like lead-capture or invoice/update.
  5. Save changes and activate the workflow if needed.

Example:

If your n8n base URL is https://automation.example.com, and your new path is crm/new-lead, your full webhook URL becomes:

https://automation.example.com/webhook/crm/new-lead

⚠️ Note: Avoid special characters and spaces in the path field, and always test after making changes.

Method 2: Update Environment Variables for Base Domain Changes

If you’ve changed your domain or moved servers, you’ll want your webhook URLs to reflect the new domain. To do this, you need to update your environment variables if you’re self-hosting.

How to Update the Webhook Base URL in Self-Hosted n8n

  1. Open your .env file or Docker configuration.
  2. Locate the environment variable: WEBHOOK_URL.
  3. Update the value to your new domain, like:
WEBHOOK_URL=https://automation.newdomain.com/
  1. Restart your n8n instance to apply the change.

This method doesn't change the path part of the webhook, only the base URL.

This is especially useful when you're self-hosting n8n using Docker or using services like DigitalOcean, Google Cloud, or Raspberry Pi where your downloadable workflows rely on base URLs.

Example Use Case: Migrating From Localhost to Production

Imagine you built and tested a workflow using http://localhost:5678 during development. When you're ready to deploy, you can:

  1. Change the WEBHOOK_URL to your production domain.
  2. Update the Path fields for clarity and security.
  3. Notify any external systems or clients using the webhook URL about the change (e.g., third-party apps, web APIs).

This kind of setup is very common in agile teams that go from dev to prod with n8n self-hosted setups.

Method 3: Clone Workflow and Create New Webhook

In rare cases, you may prefer to fully regenerate a workflow’s webhook URL. This may be necessary if you're facing URL conflicts or bugs.

Steps to Clone and Regenerate Webhook URL

  1. Duplicate the workflow using the “Clone” option.
  2. Open the Webhook node in the cloned version.
  3. Either modify the path or use the randomly generated path.
  4. Test and activate the new version.
  5. Deactivate or delete the old workflow.

This method allows for a completely clean reset, which can be helpful when you encounter common n8n issues or experience inconsistent webhook behavior.

Quick Comparison: Webhook URL Modification Methods

Here’s a summarized comparison table describing your options:

Method What It Changes Use Case
Change Webhook Node Path Endpoint only Reorganize or rename endpoint paths
Update WEBHOOK_URL Env Variable Base domain/host Move to new domain or change protocol (HTTP → HTTPS)
Clone and Regenerate Webhook Entire webhook URL Resolve conflicts, start fresh

Pro Tips When Changing n8n Webhook URLs

  • Test in Safe Mode: Use webhook test URLs during development (/webhook-test/) before committing to changes.
  • Use Consistent Naming Conventions: This keeps endpoints organized and understandable.
  • Secure Your URLs: Use Header Auth or Basic Auth when exposing webhook URLs using header authentication.
  • Keep Version Backups: It's advisable to backup your n8n workflows automatically before making major changes.

FAQ

How do I find my current webhook URL in n8n?

Open your workflow and select the Webhook node. The current URL is displayed at the bottom of the settings, both for production and test mode.

What happens if I change the webhook URL of an active workflow?

If the workflow is active and systems are already integrated with the existing URL, the new URL will break those connections unless you update the other systems accordingly.

Can I customize the webhook URL completely?

You can customize everything after /webhook/ by editing the Path in the Webhook node. To change the base URL, you’ll need to modify WEBHOOK_URL in your environment variables.

Do changes affect previous executions or history?

No, changing the webhook URL doesn’t delete or impact past executions stored in n8n's executions database.

Is changing webhook URL possible in n8n Cloud?

Yes, in n8n Cloud you can easily change the Path, but you can’t change the base domain (it’s managed by n8n). For full control, consider setting up a self-hosted n8n environment.

By following these methods, you can confidently maintain and modify your workflow triggers. Webhooks are one of the most powerful features in n8n, and knowing how to change webhook URL in n8n ensures that your automation stays robust, flexible, and secure.

Comments
Join the Discussion and Share Your Opinion
Add a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Newsletter
Get The Latest Agent Templates & Guides, Straight To Your Inbox.
Join the #1 AI Automation newsletter.