SEO itself is difficult subject to understand and if you add CDN to it then it becomes even more complex. Implementing SEO with CDN is no rocket science however it is necessary to follow best practices to ensure that you do it right.
Understanding Content Delivery Networks (CDN)
Web sites include different components like code (.html, .js (Java Script), .css), images (jpg, gif) and videos (.mp4). As a brand, you will have visitors from across the globe and depending on where you servers are located visitors on your site will experience different load times. Content Delivery Network (CDN) use a globally distributed network of proxy servers deployed at multiple locations to deliver static content depending on the geographical location (proximity) of the end-user.
CDN improves page load time and providing a seamless experience to the end user. Besides advantages in terms of page speed CDN also deliver several under the hood advantages like image compression, session optimization and improve stability for the site by minimising traffic spikes at the point of origin.
What do you need to know about implementing SEO with CDN?
Set-up CDN on your own sub-domain
Make sure that your CDN exists on a sub-domain for your website (e.g cdn.yourwebsite.com). Do not set-up the CDN on the domain of the CDN provider (e.g yourbrand.CDNCompany.com) always check with your CDN provider whether they can set-up the service on your own sub-domain. Most service providers allow CDN to be set-up on sub-domain and some also allow the service to act as a reverse proxy for your entire domain to make sure nothing change URL-wise.
Retain file names and paths
Keep the file naming conventions same as they were before implementing CDN. For example, if a video was available at URL www.yourwebsite.com/video.mpg you can rename it as assests.yourwebsite.com/video.mpg. If you make folder structure level changes for CDN chances are you can run into problems later on. If the pre-CDN file path is different from the new URL Google might treat it as a new URL and chances are you will lose traffic to link received earlier.
Set-up the CDN in Google Webmasters (Search Console)
Make sure you set-up and verify your CDN subdomain on Google Webmaster (Search Console) and Bing Webmaster Tools. Using Google Webmaster you can remove any unwanted URL’s which could have indexed in Google Search also if you are concerned with IP address of CDN being out of your targeted country you can change the geographic target using Google Webmaster.
Use Rel Canonical on CDN-Hosted Pages
If you are hosting web pages on CDN make sure you use the rel canonical tag to eliminate the issue of duplicate content. Use absolute path as opposed to the relative path. If you have CDN set-up on Google Webmasters you will receive a notification in case of duplicate pages.
Do not block CDN sub-domain on Robot.txt
Some sites & CDN services suggest to block CDN sub-domain on robot.txt doing so essentially means that the GoogleBot will not be able to see the files/resources on the blocked location. We do not recommend that you follow this practice as without being able to see your images, videos, CSS, .js files Googlebot will not be able to understand your website and nor will it be able to index those files ultimately leading to drop in traffic.
Google doesn’t punish slow sites as much as visitors do. Average visitors want websites to load under 3 seconds especially considering that majority of new visitors are accessing mobile devices. While you may not be kicked out of search ranking for having a slow site but you might not rank high in search results. Implementing CDN, therefore, helps you deliver a faster site for the users especially ones on mobile devices.
You might see a temporary fluctuation when you switch to CDN. CDN doesn’t impact SEO as long as they are configured properly.