DEV Community

Sandeep Singh
Sandeep Singh

Posted on

How to Find and Fix Broken Links on a Shopify Store

A broken link on a store costs more than one on a blog. A dead link in a blog post loses a reader. A dead link in your main menu, in a "Shop the look" block or on a cart upsell loses an order, and Shopify won't tell you about it. Products get deleted, collections get renamed, apps get uninstalled, themes get swapped, and every one of those changes can leave behind links that now lead to "Page not found."

This guide shows a repeatable way to find those links with free tools and fix them properly. You don't need a developer or a paid app.

Where broken links come from on Shopify

Knowing the usual causes tells you where to look first:

  • Deleted or drafted products. A product that is deleted, set to Draft or removed from the Online Store channel returns a 404. Every link to it from a collection description, blog post, menu or "related products" block now breaks.
  • Changed URL handles. If you rename a product or collection and edit its handle, the old URL stops working unless a redirect was created.
  • Menu items pointing at things that no longer exist. Menus (Content → Menus in the Shopify admin) often link to seasonal collections or pages that were removed months ago.
  • Hard-coded links in theme sections and rich text. Banners, slideshows and "image with text" blocks often have full URLs pasted in by hand. Typos and old handles hide here.
  • External links. Links to suppliers, size guides on other sites, social profiles or affiliate partners break when their sites change.
  • Images. An image deleted from Files, or a hot-linked image on another server, leaves an empty box where a product photo should be.

Step 1: Check what Google has already found (Google Search Console)

If you haven't connected Google Search Console yet, verify your domain and submit your sitemap (yourstore.com/sitemap.xml; Shopify generates it automatically).

Then open Indexing → Pages and look under "Why pages aren't indexed" for:

  • Not found (404). URLs Google tried to crawl that no longer exist.
  • Redirect error. Redirects that loop or go nowhere.

Click into each list to see example URLs. The URL Inspection tool tells you where Google first discovered a URL, which often points to the page holding the bad link.

Know the limits. Google crawls on its own schedule, so the report lags behind your changes. It only shows URLs Google cares to crawl, so it won't list a broken link in your footer if Google hasn't recrawled that page yet. And a 404 isn't always a problem: Google's documentation says URLs that return 4xx codes are dropped from the index over time (Google: how HTTP status codes affect crawling). That's fine for a product you truly retired. What you need to fix are the links that still point to it.

Step 2: Crawl your own store

A crawler visits your pages the way a visitor would and reports every link that returns an error, along with the page that contains it. That second part is what makes it useful.

Free options:

  • Screaming Frog SEO Spider (free version). A desktop app for Windows, macOS and Linux. The free version crawls up to 500 URLs per crawl, which covers many small stores. Saving crawls and most advanced settings need the paid licence (Screaming Frog pricing and limits). After a crawl, filter Response Codes → Client Error (4xx), select a URL, and open the Inlinks tab at the bottom to see every page that links to it, with the anchor text.
  • Free online checkers such as Dead Link Checker or W3C's Link Checker are fine for a quick look at a small site. They usually report less about where the link lives.

Tips for crawling a Shopify store:

  1. Start from your homepage and let the crawler follow internal links. Your main navigation and footer are on every page, so a broken menu link shows up on every page of the report. Fix it once and the whole list shrinks.
  2. Exclude URLs you don't care about: /cart, /account, /search? and filter or sort parameters such as ?sort_by= and ?filter.. Those create many near-duplicate URLs and eat your 500-URL allowance.
  3. Crawl gently. Most desktop crawlers let you limit requests per second. One or two is plenty for a small store.
  4. Crawl after every big change: a theme switch, a bulk product import, an app removal or a menu rebuild.

Step 3: Check the pages that make money, by hand

Crawlers follow links in the HTML. Some Shopify themes and apps inject buttons, upsells or recommendations with JavaScript, and crawlers that read only server HTML can miss them. So once a month, walk the purchase path yourself:

  1. Open your homepage in a private window.
  2. Click each main menu item and each homepage banner.
  3. Open a best-selling product, add it to the cart, and continue to the checkout page. Stop before paying.
  4. Open the browser developer tools (F12) → Network tab, reload, and sort by Status. Anything red (404, 500) is a resource or link that failed.
  5. Do the same on your phone. Mobile menus are often separate markup.

This takes about ten minutes and catches problems no crawler sees.

Step 4: Fix each broken link the right way

For each broken URL you'll make one of three fixes.

Fix A: Update the link at its source (best)

If the link is under your control (a menu item, a banner, a product description), edit it to point straight at the right live URL. A direct link is always better than a link that relies on a redirect.

  • Menus: Content → Menus → open the menu → click the broken item → choose the new collection, product or page.
  • Theme sections: Online Store → Themes → Customize → find the section → update the link field.
  • Rich text (descriptions, pages, blog posts): open the item, select the link, and edit it. Switch to the HTML view (<>) if the link is buried.

Fix B: Add a URL redirect (for URLs other people link to)

If the old URL is in emails, ads, social posts or other sites' backlinks, you can't edit those links. Add a 301 redirect so visitors land somewhere useful:

  1. Go to Content → Menus → View URL redirects → Create URL redirect.
  2. In Redirect from, enter the old path (e.g. /products/blue-summer-dress).
  3. In Redirect to, enter the closest live match: the replacement product, or the parent collection. Avoid sending everything to the homepage; it frustrates visitors.

A few Shopify rules worth knowing, all from Shopify's URL redirect documentation:

  • A redirect only works if the "from" URL is actually broken. If a page still loads there, the redirect is ignored.
  • You can't redirect from reserved paths such as /cart, /orders or /apps.
  • When you hide a product or collection, then redirect its URL, and later make it visible again, Shopify deletes that redirect automatically.
  • Redirects can be exported and imported as CSV. That's handy for bulk fixes after a migration.

When you change a product or collection handle in the "Search engine listing" section, Shopify offers to create the redirect for you. Leave that box ticked.

Fix C: Remove the link

If the destination is gone for good and there is no sensible replacement (an expired partner offer, a discontinued external guide), remove the link or replace it with plain text.

Step 5: Fix external links and images

  • External links: open each one. If the page has moved, update to the new URL. If it's gone, link to a different source or remove it. For affiliate links, check that the link still goes to the right product, not just that it loads.
  • Images: in the crawler, filter by images with a 4xx response. Re-upload missing images to Content → Files and update the reference. Don't hot-link images from other domains; when those servers change, your images break.

Step 6: Prevent the next batch

Most broken links are created during routine admin work, so a few habits prevent most of them:

  • Before deleting a product, search your store admin and theme for its handle, and decide where its URL should redirect.
  • Keep the redirect box ticked whenever you edit a handle.
  • Use relative links (/collections/sale) in theme settings instead of full URLs. They survive domain changes.
  • After uninstalling an app, check the pages where it showed widgets. Leftover blocks or snippets can point to app URLs that no longer exist.
  • Re-crawl on a schedule. Monthly for small stores, weekly if you publish or change products often.

Automating the check

The manual routine works, but it relies on you remembering to run it, and a broken link created on Tuesday can sit there for weeks. If you'd rather have it run on its own, there are scheduled options: Screaming Frog's paid licence can schedule crawls, several Shopify apps monitor 404s, and hosted crawlers will email you results.

Disclosure: I build Uchik, a hosted option of this kind. Uchik crawls a store daily with read-only GET requests and emails a list of broken links, missing images and redirect problems. The features page lists every check it runs, and each issue comes with the page and the exact HTML tag that caused it, as you can see in this sample ecommerce report. You can sign up for free, no credit card needed. It reads server-delivered HTML (the FAQ explains what that means for JavaScript-added links), so the manual checkout walk-through in Step 3 is still worth doing.

Quick checklist

  • [ ] Search Console connected, sitemap submitted
  • [ ] Indexing → Pages → "Not found (404)" reviewed
  • [ ] Store crawled with cart, account and filter URLs excluded
  • [ ] Every 4xx link traced to its source page via Inlinks
  • [ ] Links fixed at source; redirects added for externally shared URLs
  • [ ] Purchase path walked by hand on desktop and mobile
  • [ ] Next crawl date in the calendar

Broken links rarely appear all at once. They pile up one admin change at a time, and a short, regular check is the easiest way to keep them under control.

Top comments (0)