How to Replace Shopify CDN Links With Your Own Domain (Images, PDFs, and Files)

Recently I uploaded several PDF files to one of my Shopify stores and noticed that every file Shopify generated was using a generic CDN link instead of my own domain. At that moment I realized I had no simple way to host Shopify PDFs on my own domain without technical workarounds. That meant anyone who shared one of those files would be sending backlinks to cdn.shopify.com rather than to my store.

For SEO, branding, and shareability, this is a real problem.

Like most Shopify store owners, I initially assumed the only way to fix this was to use a reverse proxy, modify theme code, or pay for a Shopify app that rewrites asset URLs. But after digging into how Shopify structures its file paths, I found a much simpler solution that requires no apps, no server changes, and no reuploading.

This guide explains the exact method I now use across all my stores, and it consistently gives me clean, branded, SEO friendly URLs for every image, PDF, and media file. If you want your Shopify files to appear under your own domain, this is the simplest and fastest approach. This quick Shopify media domain fix has saved me hours across multiple stores.

Why Shopify Uses a Global CDN

Shopify hosts all uploaded files on its global content delivery network to ensure fast loading times for customers around the world. Every product image, PDF, guide, or media asset is routed through this CDN for performance and caching efficiency. That is why Shopify generates URLs that look like this:

https://cdn.shopify.com/s/files/1/0077/9874/0961/files/image.png?v=1761991829

From a speed perspective, this is useful. But from a Shopify SEO image URL perspective, it creates a problem. Because the URL does not include your domain, any backlinks generated from your files go to Shopify, not to your store.

Dashboard Shopify CDN Rewrite: How to Use Your Own Domain for Images, PDFs, and Files

The Solution: Rewrite the URL to Use Your Domain (Shopify CDN rewrite method)

What many store owners do not realize is that Shopify simultaneously stores a mirrored version of these files under your own domain. This is part of the standard Shopify file URL structure, even though most merchants never see it documented. The URL simply is not shown by default (as of November 23, 2025). This is why the shortcut works: you are not moving the file or creating a copy, you are just accessing the version that already exists on your domain.

This means you can often take the existing CDN URL and convert it into a domain based URL simply by changing the first part of the structure.

Here is the general pattern.

Step 1:

Take your existing Shopify CDN link, for example:

https://cdn.shopify.com/s/files/1/0077/9874/0961/files/image.png?v=1761991829

Step 2:

Replace everything before the second /files/ with https://mydomain.com/cdn/shop/

https://cdn.shopify.com/s/files/1/0077/9874/0961/files/image.png?v=1761991829


Final URL Structure:

https://mydomain.com/cdn/shop/files/image.png?v=1761991829

When creating your final URL, remember to insert your own Shopify domain in place of mydomain.com, and keep the file name plus its version parameter exactly as they appear in your original CDN link. Only the first part of the URL changes; the file path after /files/ must stay identical to your actual asset.

Troubleshooting and FAQs

Does using my domain affect Shopify CDN performance?

No. Shopify still delivers the file through the CDN; the domain is simply used as the entry point.

Do I need to reupload my files?

No. The domain based version already exists. You only rewrite the URL.

Does this work for WebP, PNG, JPG, PDFs, and videos?

Yes. It works for any file stored under /files, /products, or /articles.

Can apps still access the file?

Yes. Both URLs point to the same file identifier in Shopify’s CDN layer.