From d7f712e92751dbf82c942639181f2d3ff362ac2f Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 6 Jul 2025 19:17:29 -0600 Subject: [PATCH] docs: add instructions for adding WWW to domains with CNAME records --- apps/docs/content/docs/core/domains/index.mdx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/apps/docs/content/docs/core/domains/index.mdx b/apps/docs/content/docs/core/domains/index.mdx index 7f1bcfb..32e35c3 100644 --- a/apps/docs/content/docs/core/domains/index.mdx +++ b/apps/docs/content/docs/core/domains/index.mdx @@ -60,3 +60,18 @@ The "Container Port" specified in the domain settings is exclusively for routing When using the `Static` build type or `Nixpacks` and `Publish Directory` build type, you need to use the port `80` when creating a domain. +## Adding WWW to your domain + +If you want to add WWW to your domain, you can do it by adding a CNAME record to your DNS provider. + +For example, if your domain is `example.com`, you can add a CNAME record to your DNS provider with the following configuration: + +- TYPE: CNAME +- NAME: www +- VALUE: example.com + +Create the domain in dokploy, using the host `www.example.com` + +Now in dokploy, you can go to application -> advanced -> redirects (Select the preset www to non-www) and click on save. + +now everytime you access `www.example.com` it will redirect to `example.com`