Skip to content

Navigation Menu

Sign in
Sign up

Homepage Routing Issue on New Domain with Query Parameters – Redirects to Stencil Instead of Next.js #2240

ShubhangiSaini8 started this conversation in General
Discussion options

Hi everyone,

We’re currently working with a hybrid BigCommerce setup, using both Stencil and a headless Next.js frontend, and we've run into a strange issue related to homepage routing on our new domain when query parameters are present.

🔍 Issue Summary

We have two storefronts configured:
✅kapiva.in – Our main production storefront (works perfectly)

⚠️ kapivamen.in – A new storefront (currently facing the issue)

When users visit:
https://kapivamen.in

...it correctly loads our Next.js homepage (hosted externally).
However, when a query parameter is added, like:
https://kapivamen.in/?lang=en

👉 The request falls back to the Stencil homepage, instead of continuing to serve the headless (Next.js) homepage.
This does not happen on kapiva.in, where query parameters work fine and do not interfere with routing.

⚙️ Technical Setup

  • We use Cloudflare as a proxy, which is essential to our headless architecture.
  • Pages like checkout, PDPs, and some category pages are hosted externally and routed through Cloudflare Worker Pages.
  • We still use Stencil for a few pages like /shop-all and /account.php.
  • Domain: kapivamen.in
  • BigCommerce Subdomain: kapivamen-******.mybigcommerce.com
  • DNS: My domain is using Cloudflare for DNS. The Cloudflare DNS records are set up as CNAMEs pointed at kapivamen-******.mybigcommerce.com
  • CNAME @ -> kapivamen-******.mybigcommerce.com
  • CNAME www -> @
  • SSL/TLS: SSL is set up in Cloudflare with Full (Strict) configuration.
  • Domain Setup: The custom domain is set up in my BigCommerce domain settings as the primary domain

Cloudflare domain settings

🧪 Troubleshooting So Far

  • The domain is correctly set up and loads properly without query parameters.
  • We’ve cleared cache across the browser, BigCommerce, and Cloudflare.
  • Cloudflare Page Rules were checked — nothing interfering found.
  • Routing works perfectly for other headless pages, like PDPs and checkout.

❓What We Need Help With

  • We're trying to understand: Why does adding query parameters cause a fallback to Stencil on this new domain?
  • Is there any known workaround or fix?
  • Is there anything specific we should configure differently in BigCommerce or Cloudflare?

Any help or insights would be greatly appreciated.

Thanks in advance,

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /