惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
J
Java Code Geeks
C
Check Point Blog
Last Week in AI
Last Week in AI
Microsoft Azure Blog
Microsoft Azure Blog
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
L
LangChain Blog
有赞技术团队
有赞技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 司徒正美
IT之家
IT之家
Martin Fowler
Martin Fowler
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tailwind CSS Blog
U
Unit 42
Jina AI
Jina AI
Microsoft Security Blog
Microsoft Security Blog
I
InfoQ

Netlify Changelog

Gemini 3.5 Flash now available in Agent Runners 4 Nuxt CVEs: what Netlify users need to know Gemini 3.5 Flash now available in AI Gateway Agent Runners workflow improvements Next.js & React security release (May 2026): what to know Block project transfers out of your team Gemini 3.1 Flash-Lite now available in AI Gateway OpenAI GPT-5.5 Instant now available in AI Gateway New `netlify logs` CLI command Deploy to Netlify with Stripe Projects Netlify Database is now generally available OpenAI GPT-5.5 and GPT-5.5 Pro in AI Gateway & Agent Runners Rename an agent run GPT Image 2 now available in AI Gateway New frontend-design skill for Agent Runners Claude Opus 4.7 now available in AI Gateway and Agent Runners Pricing updates for Credit-based plans New sorting and filter controls on the Members page Netlify Database GA coming soon, no new databases for now Deploy logs streaming is now faster Netlify CLI adds prompt-based creation and anonymous deploys Deploy from Codex with the Netlify Plugin Hydrogen with React Router 7 now supported on Netlify Monitor credit usage by day Invoices for Enterprise Available on the Billing Page AI app development on production infrastructure with Netlify Introducing Prompt Templates OpenAI GPT-5.4 Nano and GPT-5.4 Mini in AI Gateway Change your pricing plan Internal Builder Role & Project Access Controls
How to set a custom domain for Deploy Previews
Nahrin Jalal · 2023-03-27 · via Netlify Changelog

Project domain customization just got more flexible on Netlify — you can now set a custom domain for Deploy Previews and/or branch deploys, and we’ll automatically create context-based subdomains for you!

Hovering over a Deploy Preview link on the Netlify UI shows a custom URL in place of the netlify.app URL

The Netlify UI now links to your customized Deploy Preview URLs

Teams on Pro plans and above can set up deploy subdomains under Site Settings > Domain Management > Automatic deploy subdomains. These settings are available to try as a Labs beta today, and will be generally available soon.

Why use custom domains for deploys?

By default, Netlify generates a Deploy Preview for each pull/merge request against your production branch and any deployed branches. Deploy Previews enable your cross-functional team to preview and collaborate on changes before they go live.

Third-party integration enablement

Some teams aren’t able to take full advantage of Deploy Previews because they have third-party integrations that can only run on allow-listed domains. By enabling Deploy Previews to use your custom domain, you’ll be able to safely include it in the allowed-domain list of any third party scripts and services where necessary. This makes third-party services available in your branches and previews, just as they would be in production.

Brand safety and security

Custom subdomains for your deploys also help to ensure better brand safety—Deploy Previews or deployed branches will now appear to come from “inside the house”, putting both stakeholders and external customers at ease. This also makes it easier for security and IT teams to build policies around company-controlled domains, helping to remove the friction between productivity and security.

How to set up custom domains for deploys

At Site Settings > Domain Management > Automatic deploy subdomains:

Deploy Previews and branch deploys are set to use netlify.app URLs by default

  1. Select “Edit custom domains”.
  2. Check “Add custom domain” next to each deploy context you want to customize.
  3. Select any domain from the “Domain” field. This list includes any (sub)domains you have delegated to Netlify DNS; you can add more at Team Overview > Domains.
  4. Add an optional prefix in the “Additional subdomain” field. You can have deploys available at *.internal.yourcompany.com instead of *.yourcompany.com. There is no need to set up any additional DNS records for this.

Both Deploy Previews and branch deploys can take a domain (selected from a dropdown) and an optional, additional subdomain prefix 5. Press “Save”.

That’s it!

Deploy Previews and branch deploys are each set to use a custom subdomain

Netlify will automatically generate wildcard DNS records and SSL certificates for each Deploy Preview (deploy-preview–123.internal.yourcompany.com) and deployed branch (branch-name.internal.yourcompany.com). We will use these URLs on the Netlify UI, in the Netlify API, and in deploy notifications:

Hovering over a Deploy Preview link on the Netlify UI shows a custom URL in place of the netlify.app URL

Netlify DNS is required for this feature, but your deploys’ custom subdomains do not need to match production. Can’t delegate an apex domain to Netlify DNS? Try a subdomain!

Differences to branch subdomains

The branch subdomains feature is still available to all teams under Site Settings > Domain Management. Unlike automatic deploy subdomains, this feature requires manually configuring each custom subdomain before it is applied to a deployed branch. The only domain available here is your site’s primary domain:

Editing the branch subdomains card shows only an option to select a branch from a list. The subdomain is created from the primary domain for you.

Developers may find they prefer this approach for some projects! The branch subdomains feature is useful if you want to tightly control new branch subdomains, instead of letting Netlify create these automatically.

Interactions with branch subdomains

If you enable automatic deploy subdomains for branch deploys on your site, the “Branch subdomains” feature will be disabled on that site:

The branch subdomains card is disabled when you have automatic deploy subdomains on for branch deploys

We will continue to serve any branch subdomains you previously configured, in addition to the new automatic subdomains.

Try it out today!

We hope that automatic deploy subdomains enable your team to better control your preview environments. You can check out the docs to learn more.

Please try it out today under Site Settings > Domain Management and let us know what you think on this short survey or on the forums!

Not already a Netlify customer? Sign up for a free Pro trial to get access to automatic deploy subdomains and more features.