{"id":275,"date":"2025-08-04T08:35:15","date_gmt":"2025-08-04T08:35:15","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2025\/08\/04\/11927159-changing-the-domain-for-n8n-on-vps-at-hostinger\/"},"modified":"2026-07-24T02:49:16","modified_gmt":"2026-07-24T02:49:16","slug":"11927159-changing-the-domain-for-n8n-on-vps-at-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/11927159-changing-the-domain-for-n8n-on-vps-at-hostinger\/","title":{"rendered":"Changing the Domain for n8n on VPS at Hostinger"},"content":{"rendered":"<p class=\"no-margin\">If you want to use your own domain (or subdomain) for accessing n8n instead of the default <code>srvXXXXX.hstgr.cloud<\/code> address, you can update the configuration by following these steps:<\/p><ol>\n<li>\n<p class=\"no-margin\">First, please make sure that the n8n subdomain of your desired domain is correctly <a class=\"intercom-content-link\" href=\"\/support\/1583227-how-to-point-a-domain-to-your-vps\/\" target=\"_blank\" rel=\"noopener\">pointed to your VPS IP address<\/a> using an A record in your DNS settings.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Access your VPS through a browser terminal:<\/p>\n<p class=\"no-margin\"><img decoding=\"async\" class=\"aligncenter wp-image-12006 size-large\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/06\/2026-06-26_12-09-1024x298.png\" alt=\"\" width=\"1024\" height=\"298\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/06\/2026-06-26_12-09-1024x298.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/06\/2026-06-26_12-09-300x87.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/06\/2026-06-26_12-09-768x224.png 768w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/06\/2026-06-26_12-09-1536x447.png 1536w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/06\/2026-06-26_12-09.png 1998w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<div class=\"intercom-container intercom-align-center\"><\/div>\n<\/li>\n<li>\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">Navigate to the container directory (replace [container-name] with your actual container&rsquo;s name):<\/p>\n<div class=\"relative group\/copy bg-bg-000\/50 border-0.5 border-border-400 rounded-lg\">\n<div class=\"sticky opacity-0 group-hover\/copy:opacity-100 top-2 py-2 h-12 w-0 float-right\">\n<div class=\"absolute right-0 h-8 px-2 items-center inline-flex z-10\"><\/div>\n<\/div>\n<div>\n<pre class=\"code-block__code !my-0 !rounded-lg !text-sm !leading-relaxed\">cd \/docker\/[container-name]<\/pre>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<p class=\"no-margin\">Edit the environment configuration file by running:<\/p>\n<pre><code>nano .env<\/code><\/pre>\n<\/li>\n<li>Locate the TRAEFIK_HOST value and replace it with your own domain or subdomain that points to your VPS (e.g., sub.domain.com).<\/li>\n<li>Save the file by pressing Ctrl+X, then Y, and Enter.<\/li>\n<li>Open the docker-compose.yml file and make two changes:\n<ul>\n<li>Change 1 &mdash; Fix the WEBHOOK_URL:\n<pre># Before\r\n- WEBHOOK_URL=https:\/\/${COMPOSE_PROJECT_NAME}.${TRAEFIK_HOST}\/\r\n\r\n# After\r\n- WEBHOOK_URL=https:\/\/${TRAEFIK_HOST}\/<\/pre>\n<\/li>\n<li>Change 2 &mdash; Fix the Traefik router rule:\n<pre># Before\r\n- traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_PROJECT_NAME}.${TRAEFIK_HOST}`)\r\n\r\n# After\r\n- traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${TRAEFIK_HOST}`)<\/pre>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-13361\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/07\/2026-07-24_09-46-1.png\" alt=\"\" width=\"1159\" height=\"639\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/07\/2026-07-24_09-46-1.png 1159w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/07\/2026-07-24_09-46-1-300x165.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/07\/2026-07-24_09-46-1-1024x565.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/07\/2026-07-24_09-46-1-768x423.png 768w\" sizes=\"(max-width: 1159px) 100vw, 1159px\" \/><\/p><\/li>\n<\/ul>\n<\/li>\n<li>\n<pre class=\"no-margin\">Restart the n8n service to apply the changes:<\/pre>\n<pre><code>docker compose down\r\ndocker compose up -d<\/code><\/pre>\n<\/li>\n<\/ol><p class=\"no-margin\">Once restarted, you should be able to access n8n via your custom domain. Make sure DNS propagation is complete before testing the new address.<\/p><p class=\"no-margin\">\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to change default domain for n8n VPS?<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[199],"tags":[],"class_list":["post-275","post","type-post","status-publish","format-standard","hentry","category-vps-management"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/11927159-changing-the-domain-for-n8n-on-vps-at-hostinger\/","default":1}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=275"}],"version-history":[{"count":6,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/275\/revisions"}],"predecessor-version":[{"id":13362,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/275\/revisions\/13362"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}