# 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**](/products/performance-cdn/static-content-delivery/create-small-cdn-resource.md) or [**Large CDN Resource**](/products/performance-cdn/static-content-delivery/create-large-cdn-resource.md) 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](/products/performance-cdn/static-content-delivery/configuration-basics/medianova-ip-blocks.md)

{% 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**](/products/mn-logz/mn-logz-analytics.md) 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](/products/performance-cdn/static-content-delivery/advanced-configuration/caching/robots.txt-file.md) if required.\
Ensure that canonical tags still point to your main domain to prevent duplicate content indexing.
{% endstep %}
{% endstepper %}


---

# 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/integrating-static-cdn-resource.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.
