Skip to Content

E-commerce brands: please don’t make these JavaScript mistakes

The best SEOs can climb the search ranks as smoothly as bighorn climb steep cliffs.

But the harsh truth is that most SEOs stumble when faced with highly technical website details… like JavasScript (JS).

As Justyna Jarosz points out, Google can’t index e-commerce websites with JavaScript blunders, which results in lower presence on the search engines – and lower revenue.

So if you’re running a custom website on JS for your store, make sure you don’t do this:

#1 – Page navigation through JavaScript. When they land on a page, Google’s crawlers will skim the page by following links on your website structure.

The problem is, JS based navigation often lets crawlers see only products on the first page.

For instance, Nike’s infinite scrolling product feed is actually indexing only a few visible products, while leaving out the rest.

One solution is providing bots with page navigation based on that will “lead them” to the next crawling page.

#2 – Generating links to product carousels. Product carousels can help with revenue, but if done excessively in JS, they can hamper your indexing.

Justyna found this out when she tested a popular product page that over-relied on JS to display product carousels – disabling JS made these sections invisible for bots.

If you’re unsure, check if your product carousel is indexed in the Search Console.

#3 – Blocking JavaScript files in robots.txt. Hey, it happens. Sometimes a number of your JS files may be disallowed in robots.txt, and Google can’t access them.

When this happens, Google will skip indexing your important resources… and consequently they won’t appear on SERP, or count towards your topical authority. Ouch.

Check robots.txt, and if there is a part of JS you don’t want bots to follow, disallow only that.

#4 – JavaScript removing content from the website. Unoptimized JS, such as clickable panels that open description boxes, etc., “block” users from accessing important content.

Don’t do this.

Instead, make sure you serve this information even when JavaScript is disabled so Google can locate them and understand it’s the part of the same entity.

Phew, that was technical. Make sure you consult a web developer and fine tune that JavaScript. It will make Google happy – and your rankings even happier!

Alex Lim is a certified book reviewer and editor with over 10 years of experience in the publishing industry. He has reviewed hundreds of books for reputable magazines and websites, such as The New York Times, The Guardian, and Goodreads. Alex has a master’s degree in comparative literature from Harvard University and a PhD in literary criticism from Oxford University. He is also the author of several acclaimed books on literary theory and analysis, such as The Art of Reading and How to Write a Book Review. Alex lives in London, England with his wife and two children. You can contact him at [email protected] or follow him on Website | Twitter | Facebook

    Ads Blocker Image Powered by Code Help Pro

    Your Support Matters...

    We run an independent site that is committed to delivering valuable content, but it comes with its challenges. Many of our readers use ad blockers, causing our advertising revenue to decline. Unlike some websites, we have not implemented paywalls to restrict access. Your support can make a significant difference. If you find this website useful and choose to support us, it would greatly secure our future. We appreciate your help. If you are currently using an ad blocker, please consider disabling it for our site. Thank you for your understanding and support.