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

Would you like to get a daily tip about Shopify?

Sign up for Eric's Daily Shopify Tips to get my daily email with a tip for Shopify every morning.

Each tip includes a way to improve your store: customer analysis, analytics, traffic, SEO, customer acquisition, Rich Results, CRO... plus plenty of puns and amazing alliterations.

Plus you'll get free access to my Premium Resource Center for free.

Join 4,400+ other Shopify store owners and sign up before the next tip is sent.

I won't send you spam. Unsubscribe at any time. Powered by ConvertKit