{"id":958,"date":"2024-05-07T11:46:19","date_gmt":"2024-05-07T11:46:19","guid":{"rendered":"https:\/\/kb.shortpixel.com\/docs\/how-to-use-keycdn-with-shortpixel-adaptive-images\/"},"modified":"2025-08-27T08:39:21","modified_gmt":"2025-08-27T08:39:21","password":"","slug":"how-to-use-keycdn-with-shortpixel-adaptive-images","status":"publish","type":"docs","link":"https:\/\/kb.shortpixel.com\/knowledge-base\/article\/how-to-use-keycdn-with-shortpixel-adaptive-images\/","title":{"rendered":"How to use KeyCDN with ShortPixel Adaptive Images"},"content":{"rendered":"\n<p>To use KeyCDN as your CDN when&nbsp;using&nbsp;<a href=\"https:\/\/wordpress.org\/plugins\/shortpixel-adaptive-images\/\" rel=\"noopener\">ShortPixel Adaptive Images<\/a>, instead of ShortPixel&#8217;s CDN, follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create an account with KeyCDN if you have not already done so: <a href=\"https:\/\/www.keycdn.com\/\" rel=\"noopener\">https:\/\/www.keycdn.com<\/a><\/li>\n\n\n\n<li>Go to <strong>Zones<\/strong> to create a new zone<i>.<\/i><\/li>\n\n\n\n<li>Enter the following data:\n<ol class=\"wp-block-list\">\n<li><b>Zone Name<\/b>: <code>spaimg<\/code> for example, or whatever you feel it can represent this zone used to deliver your images through our plugin.<\/li>\n\n\n\n<li><b>Zone Status<\/b>: active<\/li>\n\n\n\n<li><b>Zone Type<\/b>: pull<\/li>\n\n\n\n<li><b>Origin URL<\/b>: <code>https:\/\/no-cdn.shortpixel.ai<\/code><\/li>\n\n\n\n<li><b>Image Processing<\/b>: disabled<\/li>\n\n\n\n<li><p>Expand the <b>General settings<\/b> and look for the <b>SSL <\/b>option. Select <strong>letsencrypt<\/strong>.<\/p><figure style=\"max-width: 100%;\" class=\"\"><figure><img decoding=\"async\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-PezgyEOCrm.jpg\"><img decoding=\"async\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-PirvvUKL2M.jpg\"><\/figure><\/figure><\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Save the new zone.<\/li>\n\n\n\n<li>Think about a name for the subdomain you want the images to be delivered from. For example, if your domain is mywebsite.com, you could choose\u00a0<code class=\"inline-code\">img<\/code>.mywebsite.com. If <code>img<\/code> is already used by another CNAME, think of something else, like\u00a0<code class=\"inline-code\">images<\/code>.mywebsite.com or\u00a0<code class=\"inline-code\">media<\/code>.mywebsite.com.<\/li>\n\n\n\n<li>Go now to <strong>Zone Aliases<\/strong> and click on <strong>Add Zone Alias<\/strong>.<\/li>\n\n\n\n<li>Enter the alias you want, which will be what you have thought of in step #5. For example, <code>img.mywebsite.com<\/code>. Remember that\u00a0<code class=\"inline-code\">mywebsite.com<\/code> should be changed to your actual domain.<\/li>\n\n\n\n<li><p>Choose the zone you created previously.<\/p><figure><img decoding=\"async\" style=\"max-width: 100%;\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-Xms7XWdqjO.jpg\"><\/figure><\/li>\n\n\n\n<li><p>Go back to <strong>Zones<\/strong> and copy the zone URL.<\/p><figure><img decoding=\"async\" style=\"max-width: 100%;\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-5tg3I6iQDV.jpg\"><\/figure><\/li>\n\n\n\n<li><p>In the DNS editor of your domain (ask your domain provider if you don&#8217;t know where it is), add a new\u00a0<strong>CNAME<\/strong>\u00a0record\u00a0from\u00a0<code class=\"inline-code\">img.mywebsite.com<\/code> to\u00a0the zone URL.<\/p><figure><img decoding=\"async\" style=\"max-width: 100%;\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-OZJ05tDRxJ.jpg\"><\/figure><p>Remember that\u00a0<code class=\"inline-code\">mywebsite.com<\/code> should be changed to your actual domain.<\/p><\/li>\n\n\n\n<li><strong>Wait 5 minutes<\/strong>\u00a0for your domain provider to complete all technical tasks in the background.<\/li>\n\n\n\n<li>Check with <a href=\"https:\/\/dnschecker.org\/\" rel=\"noopener\">this tool<\/a> if your CNAME is propagated correctly. If not, wait 24h-48h.<\/li>\n\n\n\n<li>Take any image URL from your website, append it to\u00a0<code class=\"inline-code\">https:\/\/img.mywebsite.com\/spai\/q_lossy+ret_wait\/<\/code> and make sure that the new URL can be accessed. Example:\n<ol class=\"wp-block-list\">\n<li>If your website is called mywebsite.com, your new CNAME is\u00a0<code class=\"inline-code\">img.mywebsite.com<\/code>, and your sample image is\u00a0<code class=\"inline-code\">https:\/\/www.mywebsite.com\/wp-content\/uploads\/2022\/04\/image.jpg<\/code>,<\/li>\n\n\n\n<li>try to access this URL:\u00a0<code class=\"inline-code\">https:\/\/img.mywebsite.com\/spai\/q_lossy+ret_wait\/https:\/\/mywebsite.com\/wp-content\/uploads\/2022\/04\/image.jpg<\/code><\/li>\n\n\n\n<li>Can you view it without errors? Proceed to the next step.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>You have done everything on KeyCDN. Now go to your WordPress website and change the API URL of ShortPixel AI.\n<ol class=\"wp-block-list\">\n<li>Go to\u00a0Settings > ShortPixel AI > Behaviour and enter\u00a0<code class=\"inline-code\">https:\/\/img.mywebsite.com\/spai<\/code> in the\u00a0<strong>API URL<\/strong>\u00a0field.<\/li>\n\n\n\n<li>Replace\u00a0<code class=\"inline-code\">mywebsite.com<\/code> with your\u00a0<strong>actual domain<\/strong>\u00a0name.<\/li>\n\n\n\n<li><p>Replace the\u00a0<code class=\"inline-code\">img<\/code> part if your subdomain is different, like configured above.<\/p><figure><img decoding=\"async\" style=\"width: 100%; max-width: 100%;\" src=\"https:\/\/kb.shortpixel.com\/wp-content\/uploads\/2025\/08\/file-an7VidLp8x.jpg\"><\/figure><\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Clear your WordPress cache:\u00a0<a href=\"https:\/\/shortpixel.com\/knowledge-base\/article\/426-how-to-clear-wordpress-cache\" rel=\"noopener\">How to clear WordPress cache<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>To use KeyCDN as your CDN when&nbsp;using&nbsp;ShortPixel Adaptive Images, instead of ShortPixel&#8217;s CDN, follow these steps:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[35],"glossaries":[],"doc_tag":[],"class_list":["post-958","docs","type-docs","status-publish","hentry","doc_category-shortpixel-adaptive-images"],"blocksy_meta":[],"year_month":"2026-04","word_count":434,"total_views":"1779","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"admin","author_nicename":"admin_mdli53m5","author_url":"https:\/\/kb.shortpixel.com\/author\/admin_mdli53m5\/"},"doc_category_info":[{"term_name":"ShortPixel Adaptive Images","term_url":"https:\/\/kb.shortpixel.com\/knowledge-base\/category\/shortpixel-adaptive-images\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/comments?post=958"}],"version-history":[{"count":2,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/958\/revisions"}],"predecessor-version":[{"id":2296,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/docs\/958\/revisions\/2296"}],"wp:attachment":[{"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/media?parent=958"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_category?post=958"},{"taxonomy":"glossaries","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/glossaries?post=958"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/kb.shortpixel.com\/wp-json\/wp\/v2\/doc_tag?post=958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}