[{"data":1,"prerenderedAt":176},["ShallowReactive",2],{"doc:cloudflare\u002Fcustom-domain":3},{"title":4,"description":5,"url":6,"markdownPath":7,"file":8,"section":9,"sectionTitle":10,"html":11,"toc":12,"navigation":35,"previous":174,"next":175},"Custom domain","Give your Cloudflare L4 Server its own domain, choose the primary address, and add or remove aliases without breaking existing links.","\u002Fdocs\u002Fcloudflare\u002Fcustom-domain","\u002Fdocs\u002Fcloudflare\u002Fcustom-domain.md","docs\u002Fcloudflare\u002Fcustom-domain.md","cloudflare","Cloudflare","\u003Cp>A new Cloudflare Server starts on its \u003Ccode>workers.dev\u003C\u002Fcode> address. You can add your own domains at any time. A Server can answer at several addresses:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>The \u003Cstrong>primary address\u003C\u002Fstrong> is used for new links, the Shell&#39;s display and background email.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Aliases\u003C\u002Fstrong> are additional addresses. They reach the same Server, with the same UUID, Accounts and content.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Every listed address works for login, sessions, Shell embedding, links, uploads, MCP and realtime. Adding an address never disables the others, and the \u003Ccode>workers.dev\u003C\u002Fcode> address always stays enabled.\u003C\u002Fp>\n\u003Ch2 id=\"before-you-start\">\u003Ca class=\"heading-anchor\" href=\"#before-you-start\">Before you start\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>The hostname must be in an \u003Cstrong>active zone in the same Cloudflare account\u003C\u002Fstrong> as the Server. Add the domain to Cloudflare first if it is not there yet.\u003C\u002Fli>\n\u003Cli>The hostname must not already be attached to another Worker.\u003C\u002Fli>\n\u003Cli>You must be the Owner.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"add-an-address\">\u003Ca class=\"heading-anchor\" href=\"#add-an-address\">Add an address\u003C\u002Fa>\u003C\u002Fh2>\n\u003Col>\n\u003Cli>In your Server, open \u003Cstrong>Server settings → Deployment → Domain\u003C\u002Fstrong>. The page is titled \u003Cstrong>Server address\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003Cli>Select \u003Cstrong>Add address\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003Cli>In \u003Cstrong>Domain\u003C\u002Fstrong>, enter the hostname, for example \u003Ccode>chat.example.com\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Optional: check \u003Cstrong>Make this the primary address\u003C\u002Fstrong>. The current primary stays available as an alias.\u003C\u002Fli>\n\u003Cli>Confirm:\u003Cul>\n\u003Cli>If the Server keeps Cloudflare access, select \u003Cstrong>Add address\u003C\u002Fstrong>. The Server attaches the domain itself.\u003C\u002Fli>\n\u003Cli>Otherwise, select \u003Cstrong>Continue to Cloudflare\u003C\u002Fstrong>. The official installer opens on llll.gg; select \u003Cstrong>Connect Cloudflare\u003C\u002Fstrong>, sign in to the account that owns the Server, then select \u003Cstrong>Apply the change\u003C\u002Fstrong>. Keep the window open until it finishes, then select \u003Cstrong>Return to Server settings\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>\u003Cfigure class=\"doc-shot doc-shot-missing\">\u003Cdiv class=\"doc-shot-frame\" role=\"img\" aria-label=\"The Server address settings with the Addresses list showing a workers.dev address marked Always available, a custom domain marked Primary, and the Add address form with the Domain field\">\u003Cspan class=\"doc-shot-label\">Screenshot coming soon\u003C\u002Fspan>\u003Cspan class=\"doc-shot-alt\">The Server address settings with the Addresses list showing a workers.dev address marked Always available, a custom domain marked Primary, and the Add address form with the Domain field\u003C\u002Fspan>\u003C\u002Fdiv>\u003Cfigcaption>Server settings → Deployment → Domain\u003C\u002Ffigcaption>\u003C\u002Ffigure>\u003C\u002Fp>\n\u003Cp>The installer attaches the hostname as a Worker custom domain in your zone. Cloudflare creates the DNS record and certificate for it.\u003C\u002Fp>\n\u003Cp>The \u003Cstrong>Requests\u003C\u002Fstrong> list on the same page shows each change and whether it completed or failed, with the reason.\u003C\u002Fp>\n\u003Ch2 id=\"change-the-primary-address\">\u003Ca class=\"heading-anchor\" href=\"#change-the-primary-address\">Change the primary address\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>On an alias, select \u003Cstrong>Make primary\u003C\u002Fstrong>. The old primary stays as an alias, so existing links keep working.\u003C\u002Fp>\n\u003Cp>New links, Shell bookmarks and background email then use the new primary. People who saved the Server in their Shell under an older address keep reaching it; the Shell recognizes the Server by its UUID.\u003C\u002Fp>\n\u003Ch2 id=\"remove-an-alias\">\u003Ca class=\"heading-anchor\" href=\"#remove-an-alias\">Remove an alias\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>On an alias, select \u003Cstrong>Remove\u003C\u002Fstrong>. This detaches the custom domain from the Worker.\u003C\u002Fp>\n\u003Cp>You cannot remove the primary address. Make another address primary first. The \u003Ccode>workers.dev\u003C\u002Fcode> address is marked \u003Cstrong>Always available\u003C\u002Fstrong> and cannot be removed here.\u003C\u002Fp>\n\u003Cblockquote class=\"callout callout-warning\">\u003Cp class=\"callout-title\">Warning\u003C\u002Fp>\u003Cp>Links, bookmarks and MCP clients that use a removed address stop working. Make sure people use the primary address before you remove an old one.\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Ch2 id=\"without-kept-cloudflare-access\">\u003Ca class=\"heading-anchor\" href=\"#without-kept-cloudflare-access\">Without kept Cloudflare access\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>If the Server does not keep Cloudflare access, every add, promote or remove goes through the official installer. The Server creates a single-use request; the installer applies it with your one-time Cloudflare authorization. The Server never receives an account-wide credential this way. See \u003Ca href=\"\u002Fdocs\u002Fcloudflare\u002Faccess\">Cloudflare access\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"things-to-check\">\u003Ca class=\"heading-anchor\" href=\"#things-to-check\">Things to check\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Only listed addresses are trusted.\u003C\u002Fstrong> A hostname that merely reaches the Worker, without being listed, is rejected for sessions and changes. It is never added automatically.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>External sign-in providers.\u003C\u002Fstrong> If you use GitHub, Google or another login provider in \u003Cstrong>Server settings → Authentication\u003C\u002Fstrong>, allow its callback URL on each address you enable there.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Zone features that rewrite scripts.\u003C\u002Fstrong> Features that inject or rewrite inline scripts, such as Rocket Loader, are incompatible with the Server&#39;s Content-Security-Policy. Keep them off for the Server&#39;s hostnames.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"related\">\u003Ca class=\"heading-anchor\" href=\"#related\">Related\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fcloudflare\u002Fmail\">Mail\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fconcepts\u002Fserver-and-shell\">Server and Shell\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n",[13,17,20,23,26,29,32],{"id":14,"text":15,"depth":16},"before-you-start","Before you start",2,{"id":18,"text":19,"depth":16},"add-an-address","Add an address",{"id":21,"text":22,"depth":16},"change-the-primary-address","Change the primary address",{"id":24,"text":25,"depth":16},"remove-an-alias","Remove an alias",{"id":27,"text":28,"depth":16},"without-kept-cloudflare-access","Without kept Cloudflare access",{"id":30,"text":31,"depth":16},"things-to-check","Things to check",{"id":33,"text":34,"depth":16},"related","Related",[36,61,85,101,120,142,164],{"id":37,"title":38,"pages":39},"get-started","Get started",[40,43,46,49,52,55,58],{"title":41,"url":42},"What is L4","\u002Fdocs\u002Fget-started\u002Fwhat-is-l4",{"title":44,"url":45},"Choose how to run your Server","\u002Fdocs\u002Fget-started\u002Fchoose-how-to-run",{"title":47,"url":48},"Create a Server on Cloudflare","\u002Fdocs\u002Fget-started\u002Fcreate-on-cloudflare",{"title":50,"url":51},"Install on a VPS","\u002Fdocs\u002Fget-started\u002Finstall-on-a-vps",{"title":53,"url":54},"Connect to a Server","\u002Fdocs\u002Fget-started\u002Fconnect-a-server",{"title":56,"url":57},"Invite your team","\u002Fdocs\u002Fget-started\u002Finvite-your-team",{"title":59,"url":60},"Create your first Agent","\u002Fdocs\u002Fget-started\u002Ffirst-agent",{"id":9,"title":10,"pages":62},[63,66,69,72,73,76,79,82],{"title":64,"url":65},"L4 on Cloudflare","\u002Fdocs\u002Fcloudflare\u002Foverview",{"title":67,"url":68},"Cloudflare access","\u002Fdocs\u002Fcloudflare\u002Faccess",{"title":70,"url":71},"Costs and limits","\u002Fdocs\u002Fcloudflare\u002Fcosts-and-limits",{"title":4,"url":6},{"title":74,"url":75},"Mail on Cloudflare","\u002Fdocs\u002Fcloudflare\u002Fmail",{"title":77,"url":78},"Update a Cloudflare Server","\u002Fdocs\u002Fcloudflare\u002Fupdates",{"title":80,"url":81},"Backups on Cloudflare","\u002Fdocs\u002Fcloudflare\u002Fbackups",{"title":83,"url":84},"Remove a Cloudflare Server","\u002Fdocs\u002Fcloudflare\u002Fremove-a-server",{"id":86,"title":87,"pages":88},"self-host","Self-host",[89,92,95,98],{"title":90,"url":91},"Run a Server on a VPS","\u002Fdocs\u002Fself-host\u002Fvps",{"title":93,"url":94},"Run a Server with Docker Compose","\u002Fdocs\u002Fself-host\u002Fdocker",{"title":96,"url":97},"Run a Server on Coolify","\u002Fdocs\u002Fself-host\u002Fcoolify",{"title":99,"url":100},"Compute Nodes","\u002Fdocs\u002Fself-host\u002Fcompute-nodes",{"id":102,"title":103,"pages":104},"concepts","Concepts",[105,108,111,114,117],{"title":106,"url":107},"Servers and the Shell","\u002Fdocs\u002Fconcepts\u002Fserver-and-shell",{"title":109,"url":110},"Accounts, Members and Roles","\u002Fdocs\u002Fconcepts\u002Faccounts-members-roles",{"title":112,"url":113},"Agents, Tasks and Runs","\u002Fdocs\u002Fconcepts\u002Fagents-tasks-runs",{"title":115,"url":116},"Files and backups","\u002Fdocs\u002Fconcepts\u002Ffiles-and-backups",{"title":118,"url":119},"Releases and updates","\u002Fdocs\u002Fconcepts\u002Freleases-and-updates",{"id":121,"title":122,"pages":123},"agents","Agents and MCP",[124,127,130,133,136,139],{"title":125,"url":126},"Agents overview","\u002Fdocs\u002Fagents\u002Foverview",{"title":128,"url":129},"Models and Providers","\u002Fdocs\u002Fagents\u002Fmodels-and-providers",{"title":131,"url":132},"Connect an MCP client","\u002Fdocs\u002Fagents\u002Fmcp",{"title":134,"url":135},"External agents","\u002Fdocs\u002Fagents\u002Fexternal-agents",{"title":137,"url":138},"Repositories and code work","\u002Fdocs\u002Fagents\u002Frepositories",{"title":140,"url":141},"Schedules","\u002Fdocs\u002Fagents\u002Fschedules",{"id":143,"title":144,"pages":145},"guides","Guides",[146,149,152,155,158,161],{"title":147,"url":148},"Chat","\u002Fdocs\u002Fguides\u002Fchat",{"title":150,"url":151},"Projects and Tasks","\u002Fdocs\u002Fguides\u002Fprojects-and-tasks",{"title":153,"url":154},"Mail","\u002Fdocs\u002Fguides\u002Fmail",{"title":156,"url":157},"Calls and Live","\u002Fdocs\u002Fguides\u002Fcalls",{"title":159,"url":160},"Notifications","\u002Fdocs\u002Fguides\u002Fnotifications",{"title":162,"url":163},"Telegram","\u002Fdocs\u002Fguides\u002Ftelegram",{"id":165,"title":166,"pages":167},"reference","Reference",[168,171],{"title":169,"url":170},"Glossary","\u002Fdocs\u002Freference\u002Fglossary",{"title":172,"url":173},"Troubleshooting","\u002Fdocs\u002Freference\u002Ftroubleshooting",{"title":70,"url":71},{"title":74,"url":75},1793335825754]