1

I am about to enable CDN on one of my new sites and want to avoid any duplicate content/ranking issues. By default WP engine CDN url's are configured the following way:

This url:

http://domain.com/wp-content/uploads/image.jpg

Will turn into:

http://cdnzonename.wpengine.netdna-cdn.com/wp-content/uploads/image.jpg

While they are keeping the paths in good order the domain it self does not belong to me.

My plan is to change the the CNAME record and point the long CDN url to something like http:/cdn.domain.com.

Are there any other possible SEO-related CDN complications I need to be aware of?

1

In short:

In using a CDN you are basically making identical copies of your content across the network. Although a CNAME with the same domain (but different subdomain as in cdn.domain.tld) definitely helps and much likely will not trigger duplicate content issues.

A good way to avoid duplicate content issues is to make use of the "rel canonical" tag.

By doing so both URLs are serving the exact same content and thus both have the same rel canonical tag in place, which both point to the version at your main domain.

Example:

domain.com/content/page1 -> rel-canonical to -> domain.com/content/page1
cdn.domain.com/content/page1 -> rel-canonical to -> domain.com/content/page1
1

Duplicate content generated by CDNs can be addressed with two approaches depending on your CDN setup:

Robots.txt: Adding a robots.txt file to your CDN-URL will tell the webcrawler whether this URL should be indexed or not. Here's an example of a simple robots.txt file:

User-agent: *   
Disallow: / 

Adding a canonical HTTP header to an asset will indicate that this asset from the CDN is only a copy. The CDN needs to offer this feature to add the canonical headers. Here's an example of an asset loaded from a CDN (including the canonical header --> ):

curl -I https://cdn.keycdn.com/img/logo.svg
HTTP/1.1 200 OK
Server: keycdn-engine
Date: Wed, 03 Feb 2016 19:52:18 GMT
Content-Type: image/svg+xml
Content-Length: 12557
Connection: keep-alive
Vary: Accept-Encoding
Last-Modified: Sat, 02 May 2015 07:59:30 GMT
ETag: "554483e2-310d"
Expires: Wed, 10 Feb 2016 19:52:18 GMT
Cache-Control: max-age=604800
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
Link: <https://www.keycdn.com/img/logo.svg>; rel="canonical"
X-Cache: HIT
X-Edge-Location: nlam
Access-Control-Allow-Origin: *
Accept-Ranges: bytes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.