Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions cdn/connectivity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,28 @@ On the Standard Network, IPv6 origin connectivity is provided on a best-effort b

If guaranteed IPv6 connectivity to your origin is required, enabling Origin Shield routes all origin traffic through a Volume Network location with native dual-stack support.

## 502 and 504 errors
Comment thread
dbContext marked this conversation as resolved.

A `502 Bad Gateway` means an edge server received an invalid response from your origin. A `504 Gateway Timeout` means the origin didn't respond in time. When the origin is unreachable, edge servers serve from cache where possible and only return the error when the file isn't cached. Common causes:

- **Origin offline:** The most common cause. Edge servers can't connect to your origin and the file isn't in cache.
- **Firewall blocking edge servers:** Because the CDN proxies all your traffic, origin firewalls or security software can mistake the volume of edge requests for an attack and block them. Whitelist the [edge server IP list](https://api.bunny.net/system/edgeserverlist) ([IPv6](https://api.bunny.net/system/edgeserverlist/ipv6)) and update it periodically as the network changes.
- **Network congestion:** A rare, transient routing problem between an edge location and a distant origin.
- **Timeouts:** By default Bunny waits 10 seconds for a TCP connection and 60 seconds for the origin to start sending data. Immediate 502s usually mean an origin firewall or WAF is rejecting the connection. These timeouts are configurable via Safehop.

Use the [bunny.net diagnostic tools](https://tools.bunny.net/) to test latency, traceroutes, and HTTP requests from over 120 locations and see whether specific regions are blocked or the origin is slow. If you've ruled out the causes above, contact [support@bunny.net](mailto:support@bunny.net).

## Origin redirect loops

If your CDN URLs return a 301 redirect back to your own domain, the origin is issuing that redirect and the CDN is forwarding it. Bunny CDN never returns a 301 on its own, except for hotlink protection. Check the following:

- **Origin URL host:** Make sure the Pull Zone Origin URL matches the exact domain your site serves from, including the `www` or non-`www` version. A mismatch triggers your origin's canonical redirect.
- **Origin URL protocol:** If your server forces HTTPS, set the Origin URL to `https://`. An `http://` Origin URL against an HTTPS-only origin produces a redirect.
- **Origin redirect or rewrite rules:** Check your server configuration for redirect or rewrite rules affecting your assets.
- **Hotlink protection:** If enabled, whitelist every domain the CDN serves (both `www` and non-`www`), with no protocol or slashes in the hostname field.

After any change, purge the full Pull Zone cache and wait for it to sync, since cached 301s persist on the edge.

## CDN Acceleration and IPv6 Origins

bunny.net's CDN Acceleration feature supports dual-stack origin connectivity when used with Bunny DNS.
Expand Down
38 changes: 37 additions & 1 deletion cdn/integrations/cms/discourse.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
---
title: Discourse
description: Speed up your Discourse forum with bunny.net CDN for faster page loads and improved performance.
url: https://support.bunny.net/hc/en-us/articles/360000549272-How-to-speed-up-Discourse-with-BunnyCDN
---

Discourse has built-in CDN support. This guide walks you through pointing it at Bunny CDN.

<Steps>
<Step title="Create a Pull Zone">
Log in to your [bunny.net dashboard](https://dash.bunny.net) and open the **Add Pull Zone** page. Choose a name for your zone, then set the origin URL to your Discourse forum (for example, `discourse.example.com`).

<Frame>
![Creating a Pull Zone for Discourse](/images/cdn/integrations/cms/discourse-add-zone.png)
</Frame>

Select a pricing tier and click **Add Pull Zone**. For more detail, see [How to create your first Pull Zone](/cdn/quickstart).
</Step>
<Step title="Configure Discourse with your Pull Zone">
Open your `app.yml` configuration file and find the following lines:

```yaml
## the origin pull CDN address for this Discourse instance
DISCOURSE_CDN_URL: https://discourse-cdn.example.com
```

If they aren't present, add them below the other `DISCOURSE_` variables. Replace the `DISCOURSE_CDN_URL` value with your Pull Zone hostname.

<Frame>
![Setting DISCOURSE_CDN_URL in app.yml](/images/cdn/integrations/cms/discourse-cdn-url.png)
</Frame>
</Step>
<Step title="Rebuild the Discourse container">
Apply the new configuration by rebuilding the container:

```bash
./launcher rebuild app
```

Once the rebuild finishes, your forum is served through Bunny CDN. To confirm everything is working, see [Verify your configuration](/cdn/verify-configuration).
</Step>
</Steps>
47 changes: 46 additions & 1 deletion cdn/integrations/cms/drupal.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
---
title: Drupal
description: Integrate bunny.net CDN with your Drupal website for faster content delivery and improved performance.
url: https://support.bunny.net/hc/en-us/articles/360018510091-How-to-speed-up-your-Drupal-website-with-BunnyCDN
---

Drupal supports CDN delivery through the [CDN module](https://www.drupal.org/project/cdn), which rewrites your asset URLs to serve them through Bunny CDN. This guide walks you through installing and configuring it.

<Steps>
<Step title="Create a Pull Zone">
Log in to your [bunny.net dashboard](https://dash.bunny.net) and create a new Pull Zone with your Drupal site as the origin URL. For details, see [How to create your first Pull Zone](/cdn/quickstart).

Match the protocol of your site exactly. If your Drupal site runs on HTTPS, enable HTTPS on the Pull Zone; if it runs on HTTP only, leave HTTPS disabled. A mismatch will cause errors.

<Note>
You can set a long Cache-Control time for Drupal. The CDN module serves updated elements from new URLs, so changes appear immediately without waiting for the cache to expire.
</Note>
</Step>
<Step title="Install the CDN module">
Download the latest `.tar.gz` release of the [Drupal CDN module](https://www.drupal.org/project/cdn) and copy its download URL. You'll need SSH or FTP access to your site.

In the Drupal admin, select **Manage**, then **Extend**, then **Install new module**.

<Frame>
![Drupal Extend page with the Install new module button](/images/cdn/integrations/cms/drupal-extend-install-module.png)
</Frame>

Paste the `.tar.gz` URL, click **Install**, and provide your SSH/FTP credentials when prompted. When the installer finishes, click **Enable newly added modules**.

Scroll to the **Web Services** section, select the **CDN** and **CDN UI** modules, then click **Install**.

<Frame>
![Enabling the CDN and CDN UI modules](/images/cdn/integrations/cms/drupal-enable-cdn-modules.png)
</Frame>
</Step>
<Step title="Configure the CDN module">
Go to **Manage → Configuration**, scroll to the bottom, and click **CDN Integration**. On the **Status** tab, make sure **Serve files from a CDN** is enabled.

<Frame>
![Enabling Serve files from a CDN](/images/cdn/integrations/cms/drupal-cdn-status.png)
</Frame>

Open the **Mapping** tab, select **Simple** mapping, choose **Serve all files**, and enter your Pull Zone hostname in the field on the right. Click **Save configuration**.

<Frame>
![Configuring the CDN mapping](/images/cdn/integrations/cms/drupal-cdn-mapping.png)
</Frame>
</Step>
</Steps>

Your Drupal site now serves static assets through Bunny CDN.
32 changes: 31 additions & 1 deletion cdn/integrations/cms/expressionengine.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
---
title: ExpressionEngine
description: Configure bunny.net CDN with ExpressionEngine to accelerate your website and optimize asset delivery.
url: https://support.bunny.net/hc/en-us/articles/360019199051-How-to-speed-up-your-ExpressionEngine-website-with-BunnyCDN
---

Setting up Bunny CDN with ExpressionEngine takes only a single line of configuration plus a template change.

<Steps>
<Step title="Create a Pull Zone">
Log in to your [bunny.net dashboard](https://dash.bunny.net) and create a new Pull Zone with your ExpressionEngine site as the origin URL. For details, see [How to create your first Pull Zone](/cdn/quickstart).
</Step>
<Step title="Edit your index.php file">
You'll need SSH or FTP access to your web server. Open the `index.php` file in your site's root and find this line:

```php
// $assign_to_config['global_vars'] = array();
```

Uncomment it and define a global variable for your CDN URL, replacing the hostname with your Pull Zone:

```php
$assign_to_config['global_vars'] = array('cdn_url' => 'https://YOURZONE.b-cdn.net/');
```
</Step>
<Step title="Use the variable in your templates">
Update your templates to reference the new `{cdn_url}` variable when linking to static resources. For example:

```text
{cdn_url}uploads/image.jpg
```
</Step>
<Step title="Test the integration">
Load your site and confirm that the URLs for your static content now include your Pull Zone hostname. Once they do, ExpressionEngine is serving assets through Bunny CDN.
</Step>
</Steps>
43 changes: 43 additions & 0 deletions cdn/integrations/cms/joomla.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: Joomla
description: Speed up your Joomla website with bunny.net CDN using the CDN for Joomla plugin.
---

Joomla can serve assets through Bunny CDN using the [CDN for Joomla plugin](https://www.regularlabs.com/extensions/cdnforjoomla) by Regular Labs, which rewrites your content URLs to serve them through the CDN.

<Note>
The free version of the CDN for Joomla plugin only supports HTTP URLs. To use HTTPS URLs, you'll need the paid version.
</Note>

<Steps>
<Step title="Install the CDN for Joomla plugin">
Download the plugin from the [Regular Labs site](https://www.regularlabs.com/extensions/cdnforjoomla). In your Joomla admin, go to **Extensions → Manage → Install**, then upload the ZIP file you downloaded.

<Frame>
![Installing the CDN for Joomla plugin](/images/cdn/integrations/cms/joomla-install-plugin.png)
</Frame>
</Step>
<Step title="Open the plugin configuration">
Go to **Extensions → Manage → Manage**, use the search to find the CDN plugin, then click it to open its configuration page and switch to the **Setup** tab.

<Frame>
![Finding the CDN plugin](/images/cdn/integrations/cms/joomla-find-plugin.png)
</Frame>
</Step>
<Step title="Create a Pull Zone">
In your [bunny.net dashboard](https://dash.bunny.net), create a new Pull Zone with a name, set the origin URL to your website, choose your tier, and click **Add Pull Zone**. For details, see [How to create your first Pull Zone](/cdn/quickstart).

<Frame>
![Creating a Pull Zone](/images/cdn/integrations/cms/joomla-create-pull-zone.png)
</Frame>
</Step>
<Step title="Set the CDN Domain">
Back on the plugin's **Setup** tab, enter your Pull Zone hostname (the `b-cdn.net` hostname) in the **CDN Domain** field, then click **Save**.

<Frame>
![Setting the CDN Domain](/images/cdn/integrations/cms/joomla-cdn-domain.png)
</Frame>
</Step>
</Steps>

Your Joomla site now serves content through Bunny CDN.
40 changes: 39 additions & 1 deletion cdn/integrations/cms/magento.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
---
title: Magento
description: Integrate bunny.net CDN with your Magento store for faster page loads and optimized e-commerce performance.
url: https://support.bunny.net/hc/en-us/articles/360001944171-How-to-speed-up-your-Magento-website-with-BunnyCDN
---

This guide walks you through serving your Magento store's static and media files through Bunny CDN in four steps.

<Steps>
<Step title="Create a Pull Zone">
Log in to your [bunny.net dashboard](https://dash.bunny.net) 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](/cdn/quickstart).

<Frame>
![Creating a Pull Zone for Magento](/images/cdn/integrations/cms/magento-add-pull-zone.png)
</Frame>
</Step>
<Step title="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.

<Frame>
![Adding CORS headers to the Pull Zone](/images/cdn/integrations/cms/magento-cors-headers.png)
</Frame>
</Step>
<Step title="Configure Magento to use the Pull Zone">
Log in to your Magento admin panel and go to **Stores → Configuration → General → Web**.

<Frame>
![Magento Web configuration](/images/cdn/integrations/cms/magento-web-config.png)
</Frame>

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.

<Frame>
![Setting the Base URLs](/images/cdn/integrations/cms/magento-base-urls.png)
</Frame>

Repeat the same values in the **Base URLs (Secure)** section, using the `https://` version of the URL to avoid connectivity issues. Click **Save Config**.
</Step>
<Step title="Flush the Magento cache">
Flush your Magento cache as prompted by the settings dashboard.
</Step>
</Steps>

Your Magento store is now serving static and media files through Bunny CDN.
39 changes: 38 additions & 1 deletion cdn/integrations/cms/prestashop.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
---
title: PrestaShop
description: Speed up your PrestaShop store with bunny.net CDN for faster product pages and improved checkout performance.
url: https://support.bunny.net/hc/en-us/articles/360016351371-How-to-speed-up-your-PrestaShop-store-with-BunnyCDN
---

PrestaShop includes built-in CDN settings, so connecting it to Bunny CDN is straightforward.

<Steps>
<Step title="Create a Pull Zone">
Log in to your [bunny.net dashboard](https://dash.bunny.net) and create a new Pull Zone with your PrestaShop 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](/cdn/quickstart).
</Step>
<Step title="Open the Performance panel">
Log in to your PrestaShop admin panel and go to **Advanced Parameters → Performance**.

<Frame>
![PrestaShop Advanced Parameters menu](/images/cdn/integrations/cms/prestashop-performance-menu.png)
</Frame>
</Step>
<Step title="Configure the CCC section">
In the **CCC (Combine, Compress and Cache)** section, set **Smart cache for CSS** and **Smart cache for JavaScript** to **Yes**.

<Frame>
![Configuring the CCC section](/images/cdn/integrations/cms/prestashop-ccc.png)
</Frame>

<Note>
On older versions of PrestaShop, this section shows checkboxes instead of dropdowns. In that case, select **Use CCC for CSS** and **Use CCC for JavaScript**.
</Note>

Click **Save**.
</Step>
<Step title="Configure the Media Servers">
Scroll down to the **Media Servers** section and enter your Pull Zone hostname in the **Media server #1** field. Click **Save**.

<Frame>
![Configuring Media server #1](/images/cdn/integrations/cms/prestashop-media-server.png)
</Frame>
</Step>
<Step title="Clear the cache (optional)">
If caching is enabled for your store, click **Clear cache** at the top of the page. Your pages will now be served through Bunny CDN.
</Step>
</Steps>
67 changes: 66 additions & 1 deletion cdn/integrations/cms/shopware.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,70 @@
---
title: Shopware
description: Configure bunny.net CDN with Shopware to accelerate your e-commerce store and improve customer experience.
url: https://support.bunny.net/hc/en-us/articles/360018577551-How-to-speed-up-your-Shopware-site-with-BunnyCDN
---

Shopware can serve media through Bunny CDN using a community-built adapter that uploads your content to a Bunny Storage zone and delivers it through a connected Pull Zone.

<Note>
The [Shopware adapter](https://github.com/tinect/TinectMediaBunnycdn) is built and maintained by the community, not by bunny.net.
</Note>

<Steps>
<Step title="Create a Storage Zone and Pull Zone">
The adapter uploads your media to a Bunny [Storage Zone](/storage), which is then delivered through a Pull Zone that uses the Storage Zone as its origin. Set up both before configuring Shopware. For details, see [How to create your first Pull Zone](/cdn/quickstart).
</Step>
<Step title="Install the Shopware adapter">
Download the latest `TinectMediaBunnycdn.zip` from the adapter's [GitHub releases page](https://github.com/tinect/TinectMediaBunnycdn/releases).

In Shopware, open **Configuration → Plugin Manager**.

<Frame>
![Opening the Shopware Plugin Manager](/images/cdn/integrations/cms/shopware-plugin-manager.png)
</Frame>

Go to **Installed**, click **Upload Plugin**, and select the ZIP file you downloaded.

<Frame>
![Uploading the plugin ZIP file](/images/cdn/integrations/cms/shopware-upload-plugin.png)
</Frame>

The plugin appears under **Uninstalled**. Click the green **+** to install it.

<Frame>
![Installing the uploaded plugin](/images/cdn/integrations/cms/shopware-enable-plugin.png)
</Frame>

Once installed, the plugin is **Inactive**. Click the pencil icon next to its name, then click **Activate**. If prompted to clear caches, confirm.

<Frame>
![Activating the plugin](/images/cdn/integrations/cms/shopware-activate-plugin.png)
</Frame>
</Step>
<Step title="Configure Shopware to use Bunny CDN">
You'll need SSH or FTP access to edit a PHP file. In your Shopware install directory, open `config.php` and append the following to the configuration array:

```php
'cdn' => [
'backend' => 'bunnycdn',
'adapters' => [
'bunnycdn' => [
'type' => 'bunnycdn',
'mediaUrl' => 'https://PULLZONE.b-cdn.net/',
'apiUrl' => 'https://storage.bunnycdn.com/STORAGEZONENAME/',
'apiKey' => 'secret-api-key',
],
],
],
```

Replace `PULLZONE` with your Pull Zone hostname, `STORAGEZONENAME` with your Storage Zone name, and `apiKey` with the password from your Storage Zone's **FTP & API Access** page.

Finally, upload your existing local media to the Storage Zone:

```bash
bin/console sw:media:migrate --from=local --to=bunnycdn
```
</Step>
</Steps>

Your Shopware store now serves media through Bunny CDN.
Loading