Mobile app version of vmapp.org
Login or Join
Odierno851

: Possible SEO issues with setting up CDN 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

@Odierno851

Posted in: #Cdn #Google #Seo

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:
domain.com/wp-content/uploads/image.jpg
Will turn into:
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?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Odierno851

2 Comments

Sorted by latest first Latest Oldest Best

 

@Nimeshi995

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 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

10% popularity Vote Up Vote Down


 

@Kaufman445

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

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme