Web News & Insights

CDN SEO: Indexing Images in SERPs

cdn seo indexing images

SEO plays a very vital role when it comes to the success of your website, and a small part of that includes your images appearing in Google image search correctly. There is sometimes confusion about how a CDN handles images and so in this post we show you the best practices for indexing images in SERPs while using a Content Delivery Network.

Importance of Images in SERPs

From our experience, image search potential is always underestimated. If you don’t setup your CDN properly, your images might not be indexing at all and you could be missing out on a lot of potential traffic from Google image search. Just how much traffic are talking about? Let’s take a look at some of the data.

  • According to a case study by Brafton Marketing, 63% of Google image search clicks turn into site traffic. Obviously this will vary from niche to niche, but that is a lot.
google image searches

Google Image Searches vs Total Searches

So let’s say your images are clicked on 500 times in Google image search over the period of a month and you sell a product with a conversion value of $50.00. If 63% of that image traffic converts to site traffic, and a mere 3% of that converts into a customer, that is potentially an additional $472.50 in sales simply from indexing your images correctly.

Easy Win

Now of course the quality of image traffic will always vary depending upon the topic of the site, and might not always convert. For example, a blog about finance where they also sell services might have a harder time converting image traffic than an eCommerce website where people are searching for pictures of specific furniture and are ready to buy.

Either way still think of Google image search as an easy win. Partially because there’s less competition and also because the competition is less likely to be properly optimized. Also, as long as you SEO your images properly and index them, there really is no extra work involved.

Ways to Track Google Image Search Traffic

You can track your google image search traffic by looking at your referral traffic in Google Analytics and looking at the search analytics in Google Search Console. Follow the steps below:

Google Analytics

Note: by default it seems Google Analytics doesn’t always pass the correct referrer, and so it is recommended to set up additional filters to see a more accurate data.

  1. In Google Analytics click into “Referrals” under “Acquisition.”
    Google Analytics acquisition referrals
  2. Search for “Google” and you will most likely get the different international versions of Google that come up. In our example, we will be using the U.S. one so click into “google.com.”google referrer
  3. Click into the referral path of /imgresgoogle imgres
  4. Add “Landing Pages” as a secondary dimension. And you will now see which pages are getting click into from SERPs. It’s not perfect as you can’t narrow down exact images (unless the page only has one image), but it helps to know which pages are getting traffic from Google Image Search.
    google image search referrals

Google Search Console – Search Analytics

You can also view image search traffic, clicks, and positions in Google Search Console. The one downfall to this is that they only provide data for the last 90 days.

  1. In Google Search Console click into “Search Traffic” and then “Search Analytics.”
  2. Change the search type to “Image.”
  3. You can then also enable impressions, CTR, and positions.
google search console images

Click to view larger

Checking The Index Status of Your Images

You can check if your images are indexed by looking at the sitemap data in Google Search Console or by using the site search operator in Google.

Google Search Console – Sitemap

In this example we are using WordPress and the Yoast SEO plugin to submit our sitemaps. Sitemaps aren’t necessarily required if your website is setup properly, but by using them it can help you diagnosis problems with your site and dig deeper into the data.

  1. In Google Search Console click into “Crawl” and then “Sitemaps.”
  2. Then click into your “Images” tab and you can see the number of images indexed out of the total submitted, within each of your sitemaps.
google search console image sitemap

Click to view larger

Google Site Search Operator

If you aren’t using sitemaps, you can also quickly jump over to Google and use a quick site search operator to find and view the images that are indexed.

To find images on your domain simply type in site:yourdomain.com and click into “Images.” You will then see all the images that are indexed. If you are checking images on a CDN you would want to type your zone URL or if you are using a custom URL, your zonealias. But instead of using the site parameter you change to the URL parameter.

KeyCDN Zone URL Example: URL:zonename-hexUserID.kxcdn.com
KeyCDN Zonealias Example: URL:cdn.keycdn.com

google URL search operator

Proper Image Indexing CDN Configuration

When it comes to setting up your CDN for indexing images there are a couple things you want to keep in mind, such as your if you are going to use your default zone URL or custom URL (CNAME), enabling the canonical header, and your robots.txt. file.

Zone URL vs Custom URL

You have two choices when setting up your CDN. By default when you setup a zone with a CDN provider your assets will point to their default zone URL such as lorem-1.kxcdn.com. Setting up a custom URL with a CNAME allows you to point your assets to a subdomain on your own domain such as cdn.yourwebsite.com.

You can properly index your images using both methods, but a custom URL has some advantages.

  1. If you use the custom URL you can use the sitemap method to view the indexed images data as we mentioned earlier. If you use the default zone URL, you will not be able to view this data. You could still use the URL search operator.
  2. You have full control over it and can switch CDN providers more easily while retaining the same URLs.
  3. The domain name will contain keywords relevant to your site. This can make for better branding, as people will your image URLs.

And remember, serving your images from a CDN to Google image search will always be faster than serving them from your origin server, due to having multiple POPs around the globe.

Canonical

An extra HTTP header added to your zone lets the Google crawler know that the content from the CDN is a copy. Once we add rel="canonical" to the HTTP header, your images will index normally as the crawler will know that they are only a copy and not duplicate content.

canonical tag

HTTP header with rel=”canonical”

You can enable the canonical header in the KeyCDN dashboard and it will be applied to the entire zone.

canonical header keycdn dashboard

Canonical Header – KeyCDN dashboard

Robots.txt File

Search engines check for a robots.txt file at the root of a site. If the file is present, they will follow the instructions but if no file is present, they will scan everything. We will not enable the file by default, meaning that everything will be indexed.

Here’s the robots.txt file that we will add to your site if you enable the Robots feature in the dashboard:

User-agent: *   
Disallow: /
  1. The first line defines the crawler the rule applies to. In the example above, the robots.txt applies to every crawler. "User-agent: Google" would only apply for Google bots.
  2. The next line defines what path can be indexed. "Disallow: /" tells the search engine to not index anything.

You can still create your own robots.txt with more detailed instructions. Robots.txt can also be enabled in the KeyCDN dashboard.

robots file

Robots file – KeyCDN dashboard

Yoast SEO and CDN Indexing

If you are using WordPress and your CDN images start to get de-indexed from your Google Search Console account, this is likely a sitemap structure issue. Assuming you are using the Yoast SEO WordPress plugin, you may need to add the following snippet at the top of your functions.php file in order for Yoast to index your images from the CDN domain. Update the domain and your CDN URLs accordingly in the snippet below.

function wpseo_cdn_filter( $uri ) {
return str_replace( 'https://www.yoursite.com', 'https://cdn.yoursite.com', $uri );
}
add_filter( 'wpseo_xml_sitemap_img_src', 'wpseo_cdn_filter' );

indexing images cdn

After adding this it might take a few days for your images to re-index in Google and show up in Google Search Console.

SEO Your Images

Now that you have learned a couple ways to configure your CDN for indexing images, there are also a few SEO tips that you always want to apply.

  1. Apply a source attribute specifying the URL of the image.
    <img src="http://yourdomain.com">
  2. Apply a width declaration (E.g. width="200px")
  3. Apply a height declaration (E.g. height="200px")
  4. Add an alt attribute to describe the image—this is the most important part of image SEO. (E.g. A picture of a blue car would have an alt tag of alt="blue car").
  5. Always use hyphens when naming your images. Google sees underscores as one word. This can seriously affect your image rankings. (E.g. blue-car.png)
  6. Optimize your images with lossless compression so they load faster no matter where they are, your website or Google image search.

Summary

As can you can see, it is important to know how a CDN handles images so that when your dealing with Google and SEO you can make the appropriate changes and configuration so that you don’t lose any traffic. This could be choosing between a default zone URL or custom URL, adding canonical tags, or using the robots.txt file. And by loading your images on a CDN, besides still being indexed properly, they will also load faster, and Google loves speed.

If you have any questions regarding images and indexing them on a CDN, feel free to comment below!

Related Articles

CDN SEO: Indexing Images in SERPs was last modified: May 5th, 2016 by Brian Jackson