{"slug": "custom-domains-for-neon-functions", "title": "Custom domains for Neon Functions", "summary": "Neon Functions reached general availability and now supports custom domains, letting developers serve a Function at a branded hostname such as api.example.com instead of its default Neon invocation URL. Neon said there is no separate charge for adding a custom domain, traffic is billed like any other Function traffic, and TLS certificates are provisioned automatically through Let's Encrypt once the CNAME status is active. A custom domain attaches to one Function on one branch rather than to the project, and Neon named MCP servers as the main use case, since a stable hostname lets an MCP endpoint be listed in plugin manifests and marketplace listings without a reverse proxy on Vercel or Cloudflare.", "body_md": "#### Just shipped\n\n[Neon Functions](https://neon.com/docs/compute/functions/overview) just reached GA. They run Node.js code on the same branch and in the same region as your Lakebase Postgres database, with `DATABASE_URL` and your Object Storage and AI Gateway credentials injected for you. [Get the full picture.](https://neon.com/blog/neon-functions-backend-logic-next-to-your-data)\n\nDuring beta, each Function was reachable only at its Neon invocation URL, something like `https://br-cool-forest-a1b2c3d4-api.compute.c-2.us-east-2.aws.neon.tech`. Now, [we support custom domains](https://neon.com/docs/compute/functions/custom-domains) - you can put it behind `api.example.com` instead.\n\nPS: There's no separate charge for adding a custom domain. Traffic through your domain is [billed like any other Function traffic](https://neon.com/docs/introduction/plans#functions), and certificates are issued automatically.\n\n## How it works\n\nYou can register a domain from the Neon Console, or with the CLI:\n\nThe command returns a CNAME target. Add that record at your DNS provider, then check its status:\n\nOnce the status is `active`, Neon routes the domain to your Function and provisions its TLS certificate through Let's Encrypt.\n\n#### Custom domains and branches\n\nA custom domain is attached to one Function on one branch, not to the project - meaning: if you register api.example.com on production, that hostname keeps pointing at the production Function even after you create a preview branch. This preview branch would need its own name, such as [preview.api.example.com](http://preview.api.example.com) (each hostname can only be registered once).\n\nYou can also declare the domain via [neon.ts](http://neon.ts) as you declare the function:\n\n## What you can build with it\n\nA stable, branded hostname is what turns a Function from an internal endpoint into something you can ship to clients and other machines. For example, **MCP servers**.\n\nBuilding MCP server was the main use case we had in mind when shipping custom domains. We’ll post more about this soon, [but the Neon backend is perfect to build MCPs](https://github.com/neondatabase/examples/tree/main/with-mcp):\n\n- Host it on a Function and it sits next to Lakebase Postgres, with `DATABASE_URL` injected, so tool calls query your data in the same region\n- Functions are long-running, which fits MCP traffic\n\nBut that endpoint has to look like yours. Marketplace listings, plugin manifests, and docs all store a URL - a hostname like `br-cool-forest-a1b2c3d4-mcp.compute.c-2.us-east-2.aws.neon.tech` is not something you put in a ChatGPT plugin or hand to a customer. Without a custom domain, the usual workaround is a reverse proxy on Vercel or Cloudflare in front of the Function, but then the MCP would no longer served from Neon.\n\nPoint `mcp.yourcompany.com` at the Function and the request goes there directly, with TLS included. Keep the frontend wherever you already host it.\n\nOther applications you can now build that need the same kind of hostname:\n\n- **Public APIs:** serve a REST or CRUD backend from[`api.example.com`](http://api.example.com)\n- **Webhook handlers:** give Stripe, GitHub, or Slack a fixed callback URL that stays put across deploys\n- **Real-time backends:** Run a WebSocket or SSE server\n- **Per-tenant subdomains:** multi-tenant platforms can point delegated hostnames such as`tenant-001.app.example.com` at a Function and route by the incoming host\n\n## Get started\n\nCustom domains already work through the Console, CLI, SDK, and API. [Follow our custom domains guide](https://neon.com/docs/compute/functions/custom-domains) or point your agent to it, and get started.", "url": "https://wpnews.pro/news/custom-domains-for-neon-functions", "canonical_source": "https://neon.com/blog/custom-domains-for-neon-functions", "published_at": "2026-09-21 12:00:00+00:00", "updated_at": "2026-09-21 15:56:21.204169+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-infrastructure", "developer-tools"], "entities": ["Neon", "Neon Functions", "Lakebase Postgres", "Let's Encrypt", "Vercel", "Cloudflare", "Stripe", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/custom-domains-for-neon-functions", "markdown": "https://wpnews.pro/news/custom-domains-for-neon-functions.md", "text": "https://wpnews.pro/news/custom-domains-for-neon-functions.txt", "jsonld": "https://wpnews.pro/news/custom-domains-for-neon-functions.jsonld"}}