# Integrate Magento with Medianova CDN

Medianova provides CDN solutions for leading e-commerce companies in Türkiye to enhance performance, scalability, and customer experience.\
If your website is built on **Magento**, you can configure a CDN integration to serve static and media content faster through Medianova’s global edge network.

{% hint style="info" %}
Before starting, we recommend backing up your Magento files and database.
{% endhint %}

### Prerequisites

* An active **Medianova CDN Resource**
* Access to your **Magento Admin Panel** (Administrator role)
* Optional: A configured **Shared SSL** or **Custom SSL** in the [Medianova Control Panel](https://cloud.medianova.com) if HTTPS is required

### Integration Steps

<figure><img src="https://clients.medianova.com/__attachments/2521268246/image-20231206-180150.png?inst-v=b951364f-998c-42f5-99c8-65d87945d391" alt=""><figcaption></figcaption></figure>

{% stepper %}
{% step %}
**Create a CDN Resource**

* Log in to the **Medianova Control Panel**.
* Create a new **CDN Resource** for your Magento domain.\
  → Once created, copy the Zone URL (for example: `https://example.mncdn.com`).
  {% endstep %}

{% step %}
**Access Magento Configuration**

* Log in to your **Magento Admin Panel**.
* In the left-hand menu, go to **Stores → Configuration**.
* Under the **General** section, select **Web**.
  {% endstep %}

{% step %}
**Configure Base URLs**

* Open the **Base URLs** section.
* In the **Base URL for Static View Files** field, enter your Zone URL followed by `/static/`.\
  Example: `https://example.mncdn.com/static/`
* In the **Base URL for User Media Files** field, enter your Zone URL followed by `/media/`.\
  Example: `https://example.mncdn.com/media/`
  {% endstep %}

{% step %}
**Save and Clear Cache**

* Click **Save Config** to apply the changes.
* Navigate to **System → Cache Management**.
* Select all cache types, click **Submit**, and then choose **Flush Magento Cache**.
  {% endstep %}
  {% endstepper %}

### Verify Integration

After completing these steps, Magento will deliver static and media files via **Medianova CDN**.

{% hint style="info" %}
To confirm integration, check the HTML source code of your website.\
All asset URLs should begin with your CDN Zone domain (for example: `https://example.mncdn.com`).
{% endhint %}

### Optional: Configure HTTPS

If your Magento site uses HTTPS, repeat the Base URL configuration steps for the **Secure** section as well.

{% hint style="info" %}
Ensure that you have configured **Shared SSL** or **Custom SSL** in the Medianova Control Panel before enabling HTTPS.
{% endhint %}

### Troubleshooting

| Problem                            | Cause                                      | Solution                                                                             |
| ---------------------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------ |
| CDN URLs not visible in HTML       | Magento cache not refreshed                | Go to **System → Cache Management** and flush all caches.                            |
| Mixed content warning (HTTP/HTTPS) | HTTPS not configured properly in Medianova | Configure **Shared SSL** or **Custom SSL** before updating secure URLs.              |
| Slow asset delivery                | Zone caching disabled                      | Check the Zone settings in the Medianova Control Panel and ensure caching is active. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://clients.medianova.com/products/performance-cdn/static-content-delivery/website-framework-integrations/magento-cdn-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
