# Integrating Static CDN Resource

After creating a **Small** or **Large CDN Resource** in the [Medianova Control Panel](https://cloud.medianova.com), you must integrate it with your website or application so that your static and media assets are delivered through the CDN instead of your origin.\
This guide explains how to update your asset URLs, firewall configuration, and CMS settings to ensure seamless content delivery via Medianova CDN.

### Prerequisites

* A [**Small** **CDN Resource**](https://clients.medianova.com/products/performance-cdn/static-content-delivery/create-small-cdn-resource) or [**Large CDN Resource**](https://clients.medianova.com/products/performance-cdn/static-content-delivery/create-large-cdn-resource) already created in the Medianova Control Panel
* Access to your website’s HTML, CSS, JS, or CMS configuration.
* Ability to modify firewall rules on your origin server.

{% hint style="info" %}
For websites with both static and video content, you can use separate CDN Resources (Small + Large) under the same account and domain structure.
{% endhint %}

{% stepper %}
{% step %}

### Identify assets for CDN delivery

List all assets that can benefit from CDN acceleration:

* For **Small CDN Resource:** images, CSS, JavaScript, fonts, and similar static content.
* For **Large CDN Resource:** videos, downloadable files, or other large media assets.
  {% endstep %}

{% step %}

### Update URLs in HTML code

Replace existing URLs with the corresponding CDN URLs.

<table><thead><tr><th width="345">Before</th><th>After</th></tr></thead><tbody><tr><td><code>&#x3C;img src="https://yourdomain.com/images/example.jpg" alt="Example Image"></code></td><td><code>&#x3C;img src="https://CDN_URL/images/example.jpg" alt="Example Image"></code></td></tr></tbody></table>
{% endstep %}

{% step %}

### Update CSS file references

Update references inside CSS files (e.g., images, fonts, or icons).

```css
/* Before */
background-image: url('/images/background.jpg');

/* After */
background-image: url('https://CDN_URL/images/background.jpg');
```

{% endstep %}

{% step %}

### Update JavaScript file references

Ensure that all script sources are loaded from the CDN.

| Before                                        | After                                                        |
| --------------------------------------------- | ------------------------------------------------------------ |
| `<script src="/scripts/example.js"></script>` | `<script src="https://CDN_URL/scripts/example.js"></script>` |
| {% endstep %}                                 |                                                              |

{% step %}

### Check relative paths

Confirm that relative paths continue to work correctly after switching to CDN URLs. Adjust directory structures if required.
{% endstep %}

{% step %}

### Verify all resources

Open your website and confirm that assets load from CDN URLs.

{% hint style="info" %}
Use browser **DevTools → Network** tab to verify requests.
{% endhint %}
{% endstep %}

{% step %}

### Update CMS or framework settings

If you use a CMS (WordPress, Drupal, Joomla, etc.), configure its CDN or performance plugin to automatically replace static URLs with CDN URLs.
{% endstep %}

{% step %}

### Allow Medianova IPs in your firewall

Add Medianova’s CDN IP ranges to your origin’s firewall allowlist to permit content fetches from edge servers.\
See [Medianova IP Blocks](https://clients.medianova.com/products/performance-cdn/static-content-delivery/configuration-basics/medianova-ip-blocks)

{% hint style="warning" %}
If your origin firewall blocks Medianova IPs, CDN requests will fail. Always verify your allowlist configuration.
{% endhint %}
{% endstep %}

{% step %}

### Test in all environments

Test both **staging** and **production** environments to ensure the CDN works correctly and does not break content delivery.
{% endstep %}

{% step %}

### Monitor and optimize performance

Use [**MNLogz Analytics**](https://clients.medianova.com/products/mn-logz/mn-logz-analytics) to monitor cache hits, latency, and traffic volume.\
Refine cache rules or resource paths if needed.
{% endstep %}

{% step %}

### Review SEO and canonical tags

When assets move to CDN URLs, update sitemaps and [robots.txt](https://clients.medianova.com/products/performance-cdn/static-content-delivery/advanced-configuration/caching/robots.txt-file) if required.\
Ensure that canonical tags still point to your main domain to prevent duplicate content indexing.
{% endstep %}
{% endstepper %}
