Shopify sections
Shopify 404 page and empty search results: what to change and how
A Shopify 404 page is your theme's 404 template, shown when a URL does not exist in the store. Edit it in Online Store > Themes > Customize by picking the 404 page in the template menu at the top. Change its wording, and usually the empty-search message, under Edit default theme content. The free Search & 404 Rescue section adds search, popular searches, collection tiles and products to the 404 and search templates. It does not redirect broken URLs.
- Layout of the section: Full (default), Compact or Products
- Default output 49.5 KB, of which 29.3 KB JavaScript and 11.4 KB CSS
Last checked:

When to use it
Redirect the URLs you know, catch the rest on the 404 and search templates
Use it when
- Typos and unknown old links still reach the 404Redirects only cover paths you know about. For everything else the section shows "We can’t find that page" until you change it, a "Back to the homepage" link that appears on the 404 state only, and a contact link that points to /pages/contact unless you change its address.
- Your search template ends in a bare empty stateThe No results headline repeats the shopper's own query through {query}. "Did you mean …" offers the first query suggestion from Shopify's predictive search. The block only renders when a search found nothing, so it can stay on the search template for good.
- The shopper needs a next step, not only an apologyAdd up to 8 popular searches, each a term with an optional link, and up to 6 collection tiles with label, link and optional image. The product row shows 2 to 8 products. Products with options show "Choose options" and link to the product page instead of adding to cart.
- You want to try a fallback before touching theme codePlace the block on both templates and compare it with your theme's own 404 and empty search. If the theme's version serves you better, remove the block. Uninstalling the app removes its blocks from the theme.
Skip it when
- You know which old URLs brokeRedirect those first so the shopper lands on the new page. Add URL redirects one by one, tick the redirect option when you change a product or collection handle, and import many at once from a CSV file. Google Search Console lists the URLs that return 404, which is where to find the paths to redirect. A redirect only fires when no live page exists at the old path.
- Your theme search already suggests alternativesKeep the theme's own empty-results state on the search template. Place the section on the 404 template only, so it appears for missing pages and nowhere else.
- You want category tiles on normal pagesWith Show at its default, the section stays invisible on any page that loads normally. For tiles on the homepage or a landing page, use a collection list section. Show set to Always is meant for a help page.
In detail
It stays hidden until a URL fails or a search finds nothing
Show decides when anything renders. "Only on 404 and empty searches" keeps the block out of sight on searches that return results. Always shows it wherever the block sits and switches to its own headline and text. Preview only changes what the builder displays; the storefront ignores it.
On an empty search the shopper can type again in the section's live search. "Suggest pages and blog articles" is on by default, so pages and articles appear next to products. Turn it off if your blog has little to do with what people shop for.
The recently viewed row stays empty unless Section Store's separate Recently Viewed section is live on the pages shoppers browse, such as product pages. That section records the history in the shopper's browser (localStorage), and this one reads it; nothing is sent anywhere. Products the shopper opened lead under "Pick up where you left off". A shopper without recorded history sees bestsellers.
Add to cart buttons send requests to the storefront cart straight from the 404 or search page. The default for After adding to cart opens the cart drawer, with the note "if the theme has one". If your theme has no drawer, choose Show a confirmation or Go to the cart page.
The default texts are translated automatically into the shopper's language. Once you write your own 404 or No results text, add a translation per shop language in the builder, because custom texts get no machine translation.
- Container queries adapt it to the width of its column; breakpoints at 750 and 1025 px
- Honours prefers-reduced-motion; images load lazily
Two ways
Hand-code the fallback in Liquid or place the section as an app block
A search field, a few collection links and a product loop are plain Liquid. Predictive suggestions, a viewing history and cart feedback need JavaScript, and that is where hand-written code gets long.
Way 1
Edit the 404 and search templates yourself
Untested outline, not a finished listing. The form and links are quick; suggestions, history and cart feedback each need your own JavaScript.
- Duplicate the live theme and work on the copy.
- Open the section that the 404 template's JSON file points to and edit its Liquid.
- Add a GET form with action routes.search_url and a text input named q.
- Add links to a few collections and loop over the products of one featured collection.
- Put the same block into the search template, wrapped in a check that search.performed is true and search.results_count is 0.
- For "Did you mean" or add to cart, write JavaScript against Shopify's Predictive Search API and Cart API.
- Repeat the edit when you switch to another theme.
Choose this if: You or your developer already work in the theme code and a search field plus a few links is enough. Then coding it yourself is the better choice: no app, your theme's own styles and none of the section's 29.3 KB of JavaScript.
Way 2
Place Search & 404 Rescue through the Section Store app block
No theme code. Free on every plan, no purchase needed. The work happens in the app builder; the theme editor gets one block per template.
- Install Section Store and open Search & 404 Rescue in the builder.
- Replace the sample popular searches and collection tiles with your own, adjust the texts, then save.
- In the theme editor, choose the 404 page from the template menu at the top.
- Add the app block "Section Store" and pick Search & 404 Rescue in its picker.
- Do the same on the search template, then save the theme.
Choose this if: Your theme is an Online Store 2.0 theme with app blocks and you want suggestions, recently viewed products and cart buttons without maintaining JavaScript. For Full on the 404 template and Compact on search, save a second instance; a section can exist up to 20 times. Placement details are in the Section Store documentation.
Builder settings
Every builder setting of Search & 404 Rescue
Change Popular searches and Collection tiles first: both ship with 4 sample items that are placeholders, not your terms or collections. Then set Contact link address if your contact page is not at /pages/contact, and pick the Layout for each template. All of this lives in the Section Store builder; the theme editor only shows the app block's picker, top and bottom padding, max width and the hide on mobile and hide on desktop switches.
Setup3
- ShowAlways: e.g. on a help page, with the "Always" headline.
- Choice: Only on 404 and empty searches, Always
- DefaultOnly on 404 and empty searches
- PreviewOnly changes this preview.
- Choice: 404 page, No results, Always
- Default404 page
- LayoutFull: search, popular searches, collections and products. Compact: search and popular searches. Products: headline and products only.
- Choice: Full, Compact, Products
- DefaultFull
Texts9
- 404 headlineThe default texts are translated automatically into the shopper's language.
- Text
- DefaultWe can’t find that page
- 404 text
- Text
- DefaultSample text
- No results headline{query} is replaced with what the shopper searched for.
- Text
- DefaultNo results for “{query}”
- No results text
- Text
- DefaultCheck the spelling, try a more general word, or start from one of these.
- Headline (always shown)
- Text
- DefaultLooking for something?
- Text (always shown)
- Text
- DefaultSearch the shop or start from one of these.
- "Homepage" link (404 only)Conditional
- Text
- DefaultBack to the homepage
- Contact linkConditional
- Text
- DefaultStill stuck? Contact us
- Contact link addressConditional
- Text
- Default/pages/contact
Search4
- Search placeholderConditional
- Text
- DefaultSearch products, collections and guides
- Show "Did you mean …" on empty searchesConditionalUses the first query suggestion of Shopify's predictive search.
- On / off
- DefaultOn
- Suggest pages and blog articlesConditional
- On / off
- DefaultOn
- Search results selector (advanced)
- Text
- DefaultEmpty
Collections1
- Collections headlineConditional
- Text
- DefaultShop by category
Products9
- Show productsConditional
- On / off
- DefaultOn
- Number of productsConditional
- Slider, 2–8
- Default4
- Show the shopper's recently viewed products firstConditionalRead from the shopper's browser, recorded by our Recently Viewed section. Nothing is sent anywhere.
- On / off
- DefaultOn
- Products headlineConditional
- Text
- DefaultBestsellers
- Headline for recently viewedConditional
- Text
- DefaultPick up where you left off
- Add to cart buttonsConditionalProducts with options link to the product page ("Choose options").
- On / off
- DefaultOn
- Show vendorConditional
- On / off
- DefaultOff
- Image ratioConditional
- Choice: Square, Portrait, Tall
- DefaultSquare
- After adding to cartConditional
- Choice: Open the cart drawer (if the theme has one), Show a confirmation, Go to the cart page
- DefaultOpen the cart drawer (if the theme has one)
Design10
- Alignment
- Choice: Center, Left
- DefaultCenter
- Text Color
- Colour
- Default#1c1b19
- Background Color
- Colour
- Defaulttransparent
- Accent color
- Colour
- Default#1c1b19
- Search field color
- Colour
- Default#ffffff
- Tile color
- Colour
- Default#f5f3ef
- Image background
- Colour
- Default#f5f3ef
- Sale color
- Colour
- Default#b4532a
- Corner Radius
- Slider, 0–32 px
- Default14 px
- Max Width
- Slider, 320–1800 px
- Default1200 px
Spacing1
- Section Spacing
- Spacing per device
- DefaultTop padding 64 / 56 / 40 px
Repeatable items3
- Popular searches
- List of items, up to 8
- Default4 sample items
- Collection tiles
- List of items, up to 6
- Default4 sample items
- Collection
- List of items, up to 1
- Default0 sample items
40 settings in 8 groups. These are settings in the Section Store builder, not theme editor settings: read from the app's section configuration, as of 2 Dec 2026. "Conditional" settings appear only once a related setting turns them on.
FAQ
What merchants ask about Shopify 404 pages and empty searches
No. Shopify has no setting that sends all missing URLs to one page; each URL redirect maps one old path to one target. Mapping a known path to its closest replacement keeps the shopper on the product or collection they wanted. Every path without a redirect lands on the 404 template.
No. The section only adds HTML, CSS and JavaScript to the page Shopify renders for the missing URL. Shopify still sets the response status, so search engines receive a 404 for that URL.
In the theme, that message comes from the theme's default content, which has a separate entry per shop language under Edit default theme content. Check that each published language has its own wording there. In Search & 404 Rescue, custom texts need a translation per shop language in the builder.
Search & 404 Rescue is free in Section Store.
Set it up in the app builder and place it through the Section Store app block. No theme code.
Sources
Sources
- Section Store app: builder configuration and generated code of Search & 404 Rescue · as of 2026-12-02
- Section Store on the Shopify App Store · as of 2026-12-02
- Shopify developer documentation: Sections