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:
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.
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.
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.
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:
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.
Somehow HTML generated by SFCC uses far too much whitespace. Why inflate your total page size with nothing of any value?
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.
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.
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:
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.)
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:
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:
- New Balance: https://www.newbalance.com/mens-shop-by-activity/running/?prefn1=color&prefn2=genderAndAgeGroupCombo&prefv1=Grey&prefv2=Men
- Puma: https://us.puma.com/en/us/mens/shoes/running-%2B-training#prefv1=gray&prefn1=refinementColor
- adidas: https://www.adidas.com/us/men-grey-running-shoes
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.
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:
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.