Skip to main content
This guide walks you through serving your Magento store’s static and media files through Bunny CDN in four steps.
1

Create a Pull Zone

Log in to your bunny.net dashboard and create a new Pull Zone with your Magento store as the origin URL. Match the protocol (HTTP or HTTPS) of your site exactly. For details, see How to create your first Pull Zone.
Creating a Pull Zone for Magento
2

Add the required CORS headers

Open your Pull Zone’s Headers settings and add the html and json extensions. This is required, otherwise your Magento admin interface won’t work correctly.
Adding CORS headers to the Pull Zone
3

Configure Magento to use the Pull Zone

Log in to your Magento admin panel and go to Stores → Configuration → General → Web.
Magento Web configuration
Open the Base URLs tab and enter your Pull Zone hostname in both Base URL for Static View Files and Base URL for User Media Files, including the /static/ and /media/ subfolders respectively.
Setting the Base URLs
Repeat the same values in the Base URLs (Secure) section, using the https:// version of the URL to avoid connectivity issues. Click Save Config.
4

Flush the Magento cache

Flush your Magento cache as prompted by the settings dashboard.
Your Magento store is now serving static and media files through Bunny CDN.
Last modified on June 23, 2026