WordPress, Offload Media, Cloudflare DNS and CNAME with DO Spaces?

September 15, 2019 150 views
DigitalOcean

I have a WordPress site that currently uses the Offload Media plugin to move thousands of images to an AWS S3 bucket. I have my DNS hosted by Cloudflare and use their CDN and have a CNAME entry that points to my S3 bucket.

I want to use Digital Ocean Spaces instead of the S3 bucket. The Offload Media plugin renames the URL of all my images to cdn.domainname.com, the S3 bucket is called cdn.domainname.com, and the CNAME pointer on Cloudflare points to the cdn.domainname.com.aws.bucketname.com.

I’ve created a Space called domainname-com and can change the CNAME pointer to the Spaces endpoint name (not using Spaces CDN) so that the CNAME points to Spaces bucket with images. IF Offload Media continues to create URL’s for the images that same as it does today (i.e. cdn.domainname.com/directory/imagename.jpg - 1) will this work? and 2) will Google SEO not notice that the bucket has changed since the URL naming is the same?

Thanks.

1 Answer

Hello,

I believe that your approach should work as expected. To be on the safe side I would also recommend going through this on how to use DigitalOcean Spaces with Wordpress and WP Offload Media and make sure that you have all of the things setup:

https://www.digitalocean.com/community/tutorials/how-to-speed-up-wordpress-asset-delivery-using-digitalocean-spaces-cdn

Also, this should not affect your SEO as the content would still be delivered from the same domain name.

Regards,
Bobby

by Hanif Jetha
In this Solutions guide, we'll demonstrate how to offload your WordPress Media Library and other static assets to DigitalOcean Spaces, and deliver these to end users using the DigitalOcean Spaces CDN.
  • Thanks for the response and the answer.

    As it turns out, I have a different problem that is keeping me from moving forward. I use Cloudflare to both host my domain and act as my CDN. Cloudflare requires that the bucket have a name and a CNAME of “cdn.domain.com” and Digital Ocean Spaces naming conventions prevent a bucket name with a “.” only alphanumeric and dashes.

    So unless I want to ditch Cloudflare (which I do not) there is no path forward with DO Spaces.

    Bob

Have another answer? Share your knowledge.