How to Create a Shopify Discount Link That Auto-Applies
Who this is for
Email, SMS, and affiliate marketers who want customers to land on the store with a code already applied.
Every Shopify discount code has a shareable link. Visiting https://yourstore.com/discount/CODE saves the code in the customer's session so it applies at checkout without typing. Add ?redirect=/products/your-product (or any store path) to send them to a specific page instead of the homepage. You can copy the link from the discount's page in Shopify Admin or build it by hand. The code's normal rules still apply — a link doesn't bypass eligibility, minimums, or usage limits.
When to use this
- You're sending a code by email or SMS and want fewer 'how do I use this' tickets.
- An influencer or affiliate needs a link that applies their code.
- You want a QR code on packaging or print that applies a discount.
- Customers keep mistyping a long code.
Step-by-step workflow
- 1
Create and activate the discount code
Build the discount as normal. A link to an inactive or expired code lands the customer on the store with nothing applied.
- 2
Build the link
Use https://yourstore.com/discount/CODE. To land on a product or collection, append ?redirect=/products/handle or ?redirect=/collections/handle. Use your primary domain so the session cookie sticks.
- 3
Add campaign tracking
Append UTM parameters to the redirect target if you want attribution in analytics. Keep the code itself readable so support can identify it.
- 4
Test in a private browser window
Open the link, add an eligible product, and go to checkout. The code should already be applied. Repeat on mobile — many email clicks open in in-app browsers.
- 5
Confirm what customers see if the code fails
Test the link after temporarily disabling the code, so support knows what a customer clicking an expired link experiences.
Discount link QA
Code: [CODE] Link: https://[domain]/discount/[CODE]?redirect=/products/[handle] [ ] Opens on the intended page [ ] Code applied at checkout (desktop) [ ] Code applied at checkout (mobile / in-app browser) [ ] Ineligible cart: correct message shown [ ] UTM parameters reach analytics Tested by: [NAME] Date: ________
Frequently asked questions
What is the Shopify discount link format?
https://yourstore.com/discount/CODE. Add ?redirect=/path to send the customer to a specific page after the code is saved.
Does a discount link bypass the code's restrictions?
No. Usage limits, minimums, customer eligibility, product scope, and active dates all still apply at checkout.
Why didn't my discount link apply the code?
Common causes: the code is inactive, the link used a non-primary domain, the cart has no eligible items, or the customer opened checkout in a different browser from the one that clicked the link.
Related resources and tools
- Why is my Shopify discount code not working?
- Are Shopify discount codes case sensitive?
- How to schedule a discount in Shopify
- How to Set Up a Free Shipping Discount Code in Shopify
- How to Set Up a Buy X Get Y (BOGO) Discount in Shopify
- How to Make a Shopify Discount Code for First Orders Only
- Shopify Automatic Discount vs Discount Code: Which to Use
- How to Deactivate or Delete a Discount Code in Shopify
- How to See How Many Times a Shopify Discount Code Was Used