---
title: Magic Transit on-demand · Cloudflare Magic Transit docs
description: Customers with access to the Magic Transit on-demand option can
  configure prefix advertisement from the IP Prefixes page in their Cloudflare
  account home or via the Cloudflare API.
lastUpdated: 2025-09-25T14:23:12.000Z
chatbotDeprioritize: false
source_url:
  html: https://developers.cloudflare.com/magic-transit/on-demand/
  md: https://developers.cloudflare.com/magic-transit/on-demand/index.md
---

Customers with access to the Magic Transit on-demand option can [configure prefix advertisement](https://developers.cloudflare.com/byoip/concepts/dynamic-advertisement/best-practices/#configure-dynamic-advertisement) from the **IP Prefixes** page in their Cloudflare account home or via the [Cloudflare API](https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/advertisement_status/methods/edit/).

A common workflow is to enable prefix advertisement during an attack so that you can take advantage of Cloudflare protection and then disable advertisement once the incident is resolved. Prefixes using BGP-controlled advertisements cannot be used in conjunction with dynamic advertisement (via dashboard/API). Please specify your preferred on-demand advertisement method during the prefix onboarding.

To ensure smooth operation in general and simplify the advertisement process during an attack scenario, refer to [Dynamic advertisement: Best practices](https://developers.cloudflare.com/byoip/concepts/dynamic-advertisement/best-practices/).

Note

Magic Transit on-demand cannot be used with Cloudflare leased IPs.
