---
title: "How to set up CDN access for Magento 2"
source: "https://docs.nexcess.com/sites-stores/managed-magento/store-management/cdn-for-magento-2/"
description: "Learn how to configure the Nexcess CDN for Magento 2. This guide covers enabling the service, updating Base URLs for static files, and flushing the cache."
vertical: "Sites & Stores"
date: "2019-09-11"
last_modified: "2026-07-02"
---

# How to set up CDN access for Magento 2

Many businesspeople wonder [**How Does a CDN Work to Speed Up Your Ecommerce Site?**](https://docs.nexcess.com/sites-stores/performance/content-delivery-networks-cdns/nexcess/edge-cdn/) but they will discover that the reasons are remarkably straightforward. Review the content, resources, and links in this article to learn more about those reasons in full detail.

## **Prerequisites**

- A functioning Magento store on your Nexcess server.
- Your [sites-portal.liquidweb.com](https://portal.nexcess.net/) username and password. If you cannot locate this information, click the [**Forgot Password**](https://sites-portal.liquidweb.com/login?target=forgot-password) link on the Client Portal login menu.

## **Step by step instructions**

The Nexcess CDN is provided at no cost for your Magento store.

1. Log in to [sites-portal.liquidweb.com](https://portal.nexcess.net/).
2. From the dashboard, click **Plans > Plan Dashboard**.
3. In order to be able to use the Nexcess CDN you will need to enable it from the **Performance** tab.
4. Click on **Configure CDN on Your Site** in the Content Delivery Network section to **Enable CDN**. A popup will display you will need to click on the **ENABLE** button.
5. Once the CDN has been enabled the CDN origin URL will now show in the Content Delivery Network section of the performance tab.
6. Locate the Nexcess CDN information from the **Performance** tab in the portal. ![](https://docs.nexcess.com/wp-content/uploads/2026/06/1592576935499-Nexcess20CDN20info20for20Magento20in20the20Portal.png)

Setup Time

Allow the CDN service at least one hour to cache your data before you attempt to verify the new settings as outlined below. A good test would be to use just visit the CDN endpoint and see if your website loads.

7. From the example URL shown in the above image, the CDN URL would read: [https://eadn-wc02-876771.nxedge.io/cdn](https://eadn-wc02-876771.nxedge.io/cdn).
8. Enter the CDN URL into your web browser. If the page loads, your assets have successfully propagated to the CDN.
9. Update your Magento install to use the CDN origin URL by selecting **Stores > Configuration > Web**.
10. From the General tab, select **Web**.
11. From the **Store View** drop-down list, select your desired store.
12. In the Base URL (Secure) section, in the **Base URL for Static View Files** and **Base URL for User Media Files** fields, enter the CDN origin URL. The static view file and user media files will depend on how your Magento 2 store is installed with or without pub in the path.

- If your Magento 2 store is installed with pub, then use: 
    - **https://eadn-wc02-876771.nxedge.io/cdn/pub/static/**
    - **https://eadn-wc02-876771.nxedge.io/cdn/pub/media/**
- If your Magento 2 store is installed without pub, then use:
    
    
    - **https://eadn-wc02-876771.nxedge.io/cdn/media/**
    - **https://eadn-wc02-876771.nxedge.io/cdn/static/**

13. In the same section, in the **Base URL for User Media Files** field, the origin URL.
14. Flush the Magento 2 cache: 
    - From the main menu, select **System > Cache Management**.
    - On the upper right, click **Flush Magento Cache**. If you do need to purge the content being stored in the Nexcess CDN you can purge the CDN directly from the portal in the performance tab.

## Conclusion

Configuring the Nexcess CDN for your Magento 2 store effectively reduces latency and improves page load times for your customers. By syncing the settings in your Nexcess Client Portal with your Magento Base URLs, you ensure that static assets are delivered via our global network. Remember to flush your Magento cache after applying these settings to ensure the changes take effect immediately.
