SEO problems with using JavaScript-based redirects in Shopify

Whenever you move a page from one url to another, you should setup redirects so the old url still works. This is even more important when you switch domain names, as that’s a chief cause of sudden SEO loss.

Shopify has built-in URL redirects but sometimes developers will reach for a JavaScript based redirect instead of the built-in ones. While JavaScript ones can work, they come with their own problems:

  • they are much slower that regular url redirects
  • they can artificially inflate your page views and deflate your bounce rate, painting a too rosy of a picture
  • they require a search engine to use JavaScript which means some niche ones might not work
  • oftentimes there are bugs in the code or there are technical problems that break the redirect without anyone knowing
  • and most importantly, you now have to maintain that code and redirect forever until the old page disappears from the Internet.

There are a few cases where JavaScript based redirects are appropriate (e.g. country switchers, based on user interaction) but they should be avoided as a tool for SEO.

Would you like more organic search traffic from Google? With JSON-LD for SEO you can get more traffic, without having to fight for better rankings through the power of Rich Results.

Eric Davis

Get more organic search traffic for your Shopify store

JSON-LD for SEO icon

Increase organic SEO traffic through Google's Rich Results. One click allows search engines and others to understand your store and products.

Install JSON-LD for SEO