I am in the process of transitioning from a Classic Microsoft CDN to a new CDN hosted under a different domain name. To ensure a seamless user experience during this migration, I intend to implement a redirection mechanism. This will automatically reroute users to the new CDN endpoint whenever they attempt to access resources from the old CDN. Let's see how to do it from Azure portal.


My old CDN is using domain name, when user access resources under this domain, the full URL will look like this:

I would like to make this request redirect to my new CDN, which the URL should be:

It's very simple.

1. Go to Rules engine blade in the old CDN endpoint.

2. Add a new rule:

  • Condition: Request URL
    • Operator: Any
  • Action: URL Redirect
    • Type: 301
    • Hostname:

That's it. Now save changes and wait for a few minutes, the redirect rule is now effective.