Salesforce Commerce Cloud SEO Gotchas and Optimizations

Updated on August 22nd, 2019, to include new examples and insights.

I’ve been seeing a lot of e-commerce brands moving to Salesforce Commerce Cloud (SFCC) these days. When I first heard about SFCC, it seemed like the brand came out of nowhere. It didn’t though, it’s just good old Demandware but rebranded after Salesforce acquired it in 2016.

It’s not hard to see why large retailers are moving to Salesforce Commerce Cloud and away from their old self-hosted Magento carts. It’s fast, flexible, and hosted in the cloud. It’s a pretty good system as far as enterprise CMSs go, and it’s backed by the cloud CRM juggernaut.

There are problems with the CMS though. For SEO, it’s still Demandware running under the hood. The funky SEO problems that have always pestered digital marketers working on Demandware are still present, and Salesforce hasn’t done everything they can to fix them. That’s why this article, as a rewrite of Ian’s original from 2012, covers much of the same ground but with some new tips thrown in.

Easy SEO Wins for Salesforce Commerce Cloud

If you or your web management team maintains Salesforce Commerce Cloud, you will likely find at least one of these optimizations helpful to you:

Use Default Values for Titles and Let Users Overwrite Them in the CMS.

There’s an enigmatic problem that occurs for pages that don’t have tags defined in SFCC, and it happens for quite a few brands. SFCC uses strings like “Sites-SiteId-Site” as placeholder text for things that aren’t defined. Without using a safe default, your pages could end up like this in the SERPs:

Screenshot showing SFCC placeholder title in SERPScreenshot showing SFCC placeholder title in SERP

Check Error HTTP Status Codes.

It looks like SFCC is defaulting to 410 status codes instead of 404 for pages that don’t exist. Which is fine, Google uses them the same way. However, I’m also seeing brands returning incorrect status codes or directing to their homepage. Here are some examples of “soft 404s.” Search engines don’t like it, so don’t make the same mistakes:

Make sure your site is returning a 410 or 404 HTTP status code for your error page, and while you’re at it, make it a good-looking and helpful custom 404 page.

Use Canonical Tags and Make Sure They Have URLs.

Demandware did a weird thing where it would add junk query parameters to product page URLs on its product listing pages (PLPs). The legacy lives on with SFCC, and we will need our canonical tags set to keep incorrect URLs out of search engines.In this screenshot, you can see that Hibbett Sports has PLPs that link to products with junk parameters in the URL. Luckily, their canonical tags are correct, and Google’s index is correct, but they shouldn’t have links like these.

Screenshot showing PLPs with junk parameters in the URLScreenshot showing PLPs with junk parameters in the URL

Use Automatically Generated XML Sitemaps.

Run the sitemap job in the middle of the night, or when your conversion rate is the lowest. Salesforce Commerce Cloud has a feature for automatically generating XML sitemaps on a schedule, and it’s a feature I like very much.Unfortunately, there are websites out there not using this feature and they are doing themselves a great disservice. You can check your site by checking the sitemap index at /sitemap_index.xml and looking at the “Lastmod” date. If the date is far too long ago to be relevant, you probably aren’t running the sitemap job on a schedule.

Screenshot showing SFCC sitemap scheduleScreenshot showing SFCC sitemap schedule

Depending on the size of your site, this job can take hours to complete and consume significant server resources. That’s why you should schedule this to run when your customers aren’t shopping.

Screenshot showing SFCC consumer activity graphScreenshot showing SFCC consumer activity graph

Automate image ALT Attributes.

Automate image ALT attributes. If at all possible, use the name of the product as the image ALT text when you’re importing products. If you can’t, at least make sure your product images are getting ALT attributes set when you’re adding new products to the CMS. If you want to get technical, have your developer make product images default to the product name when there is no value in the CMS.

What you want to avoid are blank, or nonsense alt attributes, like this SKU:

Screenshot of a PLP with a nonse SKU alt attributeScreenshot of a PLP with a nonse SKU alt attribute

Site Speed Optimization

Site speed isn’t just an SEO factor; it’s an everything factor. We repeat that to the point of cliche on this blog, and we’ll probably keep repeating it until we’re dead because it’s important. If you want to get the best rankings, conversion rate, repeat customers, lower bounce rate, and so on, your website must be blazing fast.

Minify Your HTML, CSS, and JavaScript.

Somehow HTML generated by SFCC uses far too much whitespace. Why inflate your total page size with nothing of any value?

Screenshot showing HTML whitespace in SFCCScreenshot showing HTML whitespace in SFCC

Luckily for you and everyone visiting your site, there is a built-in feature to auto-minify HTML, CSS and JS. It says optional, but in a better world this would be default.

Compress Your Images to Make Them as Small as Necessary.

Compress your images to make them as small as necessary. I don’t mean as small as possible, that would look terrible. There needs to be a balance. We all want brilliant, high-quality images of the products we’re selling, but no one wants to wait around for a 2 MB image to download on a 3G mobile connection.

Screenshot showing a list of uncompressed image sizesScreenshot showing a list of uncompressed image sizes

What we’re aiming for is a smart application of image compression that makes images as small as they can go before sacrificing quality. We have an in-depth post about this in our Ultimate Guide to Page Speed. Ideally, you would be optimally compressing your images before uploading them.

If it’s not feasible to reupload optimized images immediately, SFCC has a built-in feature for image compression you can use. It’s not great because it’s not targetable and there’s no control over the type of compression used. Use it as a stop-gap measure but never a long-term solution, no matter what anyone tries to tell you.

Use Inline CSS and JavaScript for Rendering Above the Fold.

Put everything else in an external file. You want to inline the code that’s critical for rendering the content users will see first. It helps users, and it yields better scores in Google’s site page speed tools.

What you don’t want is blocks of code, hundreds of lines long, buried deep in page source:

Screenshot showing blocks of code buried deep in page sourceScreenshot showing blocks of code buried deep in page source

Use Lazy-loading for Your Images

Use lazy-loading for your images. Does a browser need to download an image before users can see it? For most images, the answer is no. You can seize even faster page load times when you let your pages tactically postpone image requests. It’s a neat trick, and we go into the technique more in our Ultimate Guide to Page Speed (yet again.)

Tougher Stuff

These optimizations are harder. They’re technical, they require a developer to implement, but they have huge payoffs if you invest. Be advised; I’m also going full technical SEO nerd in this section.

Use Friendly URLs in Faceted Navigation.

Back in the Demandware days, there was a decision made to inflate the number of product listing page filter URLs to the point of absurdity. Such a thing looks like this, and it’s only for three PLP filters:

https://www.billabong.com/new-mens//?prefn1=product_category&prefn2=refinementColor&prefv3=L%2FXL&srule=high-to-low&sz=48&start=0&prefv1=Hats%20%26%20Beanies&prefv2=bleu&prefn3=size

Each product filter a user applied to a PLP adds 1-2 query parameters with names like “prefn1,” “prefv2,” “pmax,” and “srule.” Combine those parameters with the number of filters and options you have, and you have a major crawl budget problem.

The solution to this is to form nice looking URLs for sets of filter combinations. This accomplishes a few goals for tackling faceted navigation problems:

  • The URLs become human-readable and descriptive
  • We can separate the URLs we want to index from those we don’t
  • The URLs we keep in the index are now landing pages for long-tail queries

Here’s an illustration: which of these URLs is best equipped to compete for the term “men’s grey running shoes?” Each is using Salesforce Commerce Cloud, and they’re using basically the same filters:

My bet’s on adidas to win this race. It’s concise, readable, keyword-relevant, and fully displayable in a search snippet. The New Balance URL is a mess, but it contains “men,” “running,” and “grey.” Puma looks pretty good, but the URL fragment trick they’re using to manage their crawl budget cuts off the filter for the color grey.

Since Google ignores everything after the hash sign (#) in a URL, Puma is missing out on copious long-tail traffic. If they just formatted their URLs more like adidas, they could have landing pages targeting queries for men’s grey running shoes, women’s grey running shoes, black, white, red, etc.

Keep API URLs Out of the Index.

It’s surprisingly easy for Salesforce Commerce Cloud developers to link to URLs like /on/demandware.store/Sites-SiteId-Sites/default/SomeAPICall, and they shouldn’t.

These URLs aren’t pages. They’re hooks for executing scripts on the backend for doing things like logging in or showing the contents of a shopping cart. Because they’re not real pages, letting Google find them wastes crawl budget and could create a thin content issue.

Screenshot showing API URLs in SERPsScreenshot showing API URLs in SERPs

The go-to solution I see happening the most often is adding lines to robots.txt that look like Disallow: /on/demandware.store, and it’s incorrect. You cannot use robots.txt to remove things from the index.

Control the search index the right way with either of these approaches:

  • Don’t link to API endpoint URLs
  • Configure SFCC to add X-Robots-Tag: noindex, nofollow to the HTTP response headers for these URLs

Find Instances of “Sites-SiteId-Site” in Content and Fix Them.

In an earlier recommendation, I said you need to set default page titles to prevent this from showing up inside <title>. This string can show up in all sorts of places users can see: H1s, meta descriptions, content, navigation, and so on.

Each instance of this takes you further away from perfect. It’s a bad code smell that indicates there are other issues you need to address to get your infrastructure in line. To quickly hunt down “Sites-SiteId-Site” problems get your SiteId from a developer or CTRL-F for “siteid” in your page source code. Then do this search in Google:

Screenshot showing how to search for your Site Id in GoogleScreenshot showing how to search for your Site Id in Google

Since the string is like a default error value, it can show up in weird places. Be aware, however “Site-SiteId-Site” is in each API call URL and is not a problem. Doing a search over page source to find this will result in a lot of false positives.

Salesforce Commerce Cloud is Pretty Good

Flexibility is a double-edged sword. The possibilities that cause so many SEO problems in SFCC also make it capable of incredible customization. Overall, I like it significantly more than other enterprise CMSs out there. I would use SFCC if I were a big retailer.

Part of why I like SFCC so much is familiarity. We’ve been working on Demandware/SFCC websites for a long time and its quirks are well-understood. Our Mothership even has a dedicated e-commerce team that works on SFCC frequently.

The other part is that we like solving gnarly problems. If you have a vexing SEO issue with Salesforce Commerce Cloud, hit us with it. We’ll help you untangle.

The post Salesforce Commerce Cloud SEO Gotchas and Optimizations appeared first on Portent.


Leave a Reply

Your email address will not be published. Required fields are marked *