{"id":10522,"date":"2025-09-22T20:04:51","date_gmt":"2025-09-23T00:04:51","guid":{"rendered":"https:\/\/learndash.com\/support\/?post_type=docs&#038;p=10522"},"modified":"2025-09-27T17:35:01","modified_gmt":"2025-09-27T21:35:01","password":"","slug":"how-to-configure-api-cdn","status":"publish","type":"docs","link":"https:\/\/learndash.com\/support\/kb\/learndash-app\/managing-learndash-app\/how-to-configure-api-cdn\/","title":{"rendered":"How to Configure API CDN"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"h-introduction\"><strong>Introduction<\/strong><\/h2>\n\n\n\n<p><strong><br><\/strong>Using a Content Delivery Network (CDN) to serve your media files such as images, documents, and videos improves app speed and reduces server load by routing traffic through faster, globally distributed edge servers.<br><\/p>\n\n\n\n<p>This guide walks you through enabling API CDN in your LearnDash App, setting your CDN URL, and optimizing performance through seamless media delivery.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-enabling-the-api-performance-component\"><strong>Enabling the API Performance Component<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In your WordPress admin, go to <strong>LearnDash App > Components<\/strong>.<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"817\" height=\"118\" src=\"https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-1.png\" alt=\"Screenshot of Components Menu\" class=\"wp-image-10847\" srcset=\"https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-1.png 817w, https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-1-400x58.png 400w, https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-1-800x116.png 800w, https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-1-768x111.png 768w, https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-1-360x52.png 360w\" sizes=\"auto, (max-width: 817px) 100vw, 817px\" \/><\/figure><\/div>\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>Toggle on <strong>API Performance<\/strong>.<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"923\" height=\"73\" src=\"https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-2.png\" alt=\"Screenshot of toggle to turn on API Performance\" class=\"wp-image-10848\" srcset=\"https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-2.png 923w, https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-2-400x32.png 400w, https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-2-800x63.png 800w, https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-2-768x61.png 768w, https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-2-360x28.png 360w\" sizes=\"auto, (max-width: 923px) 100vw, 923px\" \/><\/figure><\/div>\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Click <strong>Save Changes<\/strong>.<br><\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-configuring-your-cdn-url\"><strong>Configuring Your CDN URL<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Navigate to <strong>LearnDash App > Settings > API CDN<\/strong>.<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"870\" height=\"93\" src=\"https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-3.png\" alt=\"Screenshot of Settings and API CDN menu\" class=\"wp-image-10849\" srcset=\"https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-3.png 870w, https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-3-400x43.png 400w, https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-3-800x86.png 800w, https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-3-768x82.png 768w, https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-3-360x38.png 360w\" sizes=\"auto, (max-width: 870px) 100vw, 870px\" \/><\/figure><\/div>\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>Check <strong>Enable API CDN<\/strong>.<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1071\" height=\"154\" src=\"https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-4.png\" alt=\"Screenshot of Enable API CDN toggle\" class=\"wp-image-10850\" srcset=\"https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-4.png 1071w, https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-4-400x58.png 400w, https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-4-800x115.png 800w, https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-4-768x110.png 768w, https:\/\/learndash.com\/support\/wp-content\/uploads\/2025\/09\/How-to-Configure-API-CDN-in-Your-Learndash-App-_-4-360x52.png 360w\" sizes=\"auto, (max-width: 1071px) 100vw, 1071px\" \/><\/figure><\/div>\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>Check <strong>Enable API CDN<\/strong>.<br><\/li>\n\n\n\n<li>Enter your CDN base URL (without a trailing slash).<br><\/li>\n\n\n\n<li>Click <strong>Save Changes<\/strong>.<br><\/li>\n<\/ol>\n\n\n\n<p><strong>Note:<\/strong> Use the CDN URL provided by your service (e.g., CloudFront, StackPath, BunnyCDN).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-the-api-cdn-works\"><strong>How the API CDN Works<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>First Request:<\/strong> The app fetches media from your WordPress site and uploads it to your CDN.<br><\/li>\n\n\n\n<li><strong>Subsequent Requests:<\/strong> The media is served via your CDN\u2019s domain, reducing latency.<br><\/li>\n\n\n\n<li><strong>Offline Courses:<\/strong> If LearnDash offline mode is enabled, media downloads come from the CDN as well.<br><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-integrations-amp-best-practices\"><strong>Integrations &amp; Best Practices<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Vimeo Integration:<\/strong> For secure offline LearnDash videos, use the [Vimeo integration] (requires Vimeo Pro).<br><\/li>\n\n\n\n<li><strong>API Caching:<\/strong> For optimal performance, combine <strong>API CDN<\/strong> with <strong>API Caching<\/strong>. See our caching tutorial for configuration steps.<br><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-troubleshooting-and-faqs\"><strong>Troubleshooting and FAQs<\/strong><\/h2>\n\n\n\n<p><strong>Q: Why is my media still loading from the origin server?<\/strong><strong><br><\/strong> <strong>A:<\/strong> Double-check that <strong>Enable API CDN<\/strong> is toggled on and your CDN URL is correct (no trailing slash).<\/p>\n\n\n\n<p><strong>Q: My CDN isn\u2019t showing new media files.<\/strong><strong><br><\/strong> <strong>A:<\/strong> Clear any plugin\/CDN caches, then access the media in the app to trigger syncing.<\/p>\n\n\n\n<p><strong>Q: I\u2019m getting errors when saving the CDN URL.<\/strong><strong><br><\/strong> <strong>A:<\/strong> Make sure the URL uses <strong>HTTPS<\/strong> and your server can reach the CDN provider.<\/p>\n\n\n\n<p><strong>Q: Media for offline courses isn\u2019t downloading.<\/strong><strong><br><\/strong> <strong>A:<\/strong> Confirm both <strong>Enable API CDN<\/strong> and <strong>LearnDash Offline Courses<\/strong> are active. Also ensure your CDN files are publicly accessible.<\/p>\n\n\n\n<p><strong>Q: Can I exclude certain file types from the CDN?<\/strong><strong><br><\/strong> <strong>A:<\/strong> Not from the app settings. Use your CDN provider\u2019s custom rules or URL patterns to filter asset types.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Using a Content Delivery Network (CDN) to serve your media files such as images, documents, and videos improves app speed and reduces server load by routing traffic through faster, globally distributed edge servers. This guide walks you through enabling API CDN in your LearnDash App, setting your CDN URL, and optimizing performance through seamless&#8230;<\/p>\n","protected":false},"author":58,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_helpful_status":1,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"doc_category":[285],"doc_tag":[],"knowledge_base":[283],"class_list":["post-10522","docs","type-docs","status-publish","hentry","doc_category-managing-learndash-app","knowledge_base-learndash-app"],"year_month":"2026-04","word_count":349,"total_views":"811","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"display_name":"Stephanie Liy","author_link":"https:\/\/learndash.com\/support\/author\/stephaniei\/"},"doc_category_info":[{"term_name":"Managing Your LearnDash App","term_url":"https:\/\/learndash.com\/support\/kb\/learndash-app\/managing-learndash-app\/"}],"doc_tag_info":[],"taxonomy_info":{"doc_category":[{"value":285,"label":"Managing Your LearnDash App"}],"knowledge_base":[{"value":283,"label":"LearnDash App"}]},"featured_image_src_large":false,"comment_info":0,"knowledge_base_info":[{"term_name":"LearnDash App","term_url":"https:\/\/learndash.com\/support\/kb\/learndash-app\/","term_slug":"learndash-app"}],"knowledge_base_slug":["learndash-app"],"_links":{"self":[{"href":"https:\/\/learndash.com\/support\/wp-json\/wp\/v2\/docs\/10522","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/learndash.com\/support\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/learndash.com\/support\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/learndash.com\/support\/wp-json\/wp\/v2\/users\/58"}],"replies":[{"embeddable":true,"href":"https:\/\/learndash.com\/support\/wp-json\/wp\/v2\/comments?post=10522"}],"version-history":[{"count":2,"href":"https:\/\/learndash.com\/support\/wp-json\/wp\/v2\/docs\/10522\/revisions"}],"predecessor-version":[{"id":10852,"href":"https:\/\/learndash.com\/support\/wp-json\/wp\/v2\/docs\/10522\/revisions\/10852"}],"wp:attachment":[{"href":"https:\/\/learndash.com\/support\/wp-json\/wp\/v2\/media?parent=10522"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/learndash.com\/support\/wp-json\/wp\/v2\/doc_category?post=10522"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/learndash.com\/support\/wp-json\/wp\/v2\/doc_tag?post=10522"},{"taxonomy":"knowledge_base","embeddable":true,"href":"https:\/\/learndash.com\/support\/wp-json\/wp\/v2\/knowledge_base?post=10522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}