INCLUDED IN AGENTICSUITE

Headless Email URLs for Magento 2

Keep transactional email links pointing at the storefront customers actually use. Configure the frontend domain for Magento’s email-area URLs.

Included in AgenticSuite

This capability is included in AgenticSuite. Get the Astro storefront and all headless and Luma-compatible modules listed on this website.

Explore AgenticSuite Discuss your Magento project
Your platform. Your control.Full source code and your business data.
Built to work togetherAstro storefront and comprehensive Magento modules.
Check your requirements with us
  • Use the customer-facing storefront domain
  • Order emails, resets and other email links
  • Admin and API URLs remain separate
User Guide
MODULE DEMO · 0:38

Headless Email URLs for Magento 2 — Transactional Emails That Link to Your Storefront

BUILT AROUND THE WAY YOU WORK

Bring email customers back to the right store.

Included in AgenticSuite. This is part of a headless Magento implementation; the storefront and deployment must be configured to use it.

01

Set the storefront destination

Configure your real frontend domain so supported Magento email-area links point customers at the headless storefront.

The Headless Storefront Links settings in Stores → Configuration → General → Web — turn on "Use Storefront URL for Email & Link URLs" and enter your storefront URL
The Headless Storefront Links settings in Stores → Configuration → General → Web — turn on "Use Storefront URL for Email & Link URLs" and enter your storefront URL
02

Keep backend routing separate

The rewrite operates in the email frontend area. Admin and API routing stay separate from the customer-facing destination.

A CLEAR WORKFLOW

From setup to everyday use.

  1. 01

    Explore AgenticSuite and the live storefronts to see how the parts fit together.

  2. 02

    Discuss your current Magento setup, integrations and requirements with our team.

  3. 03

    Configure and test this capability as part of the agreed storefront project.

BEFORE YOU DECIDE

A few straight answers.

Need to check your own store?
Talk to our team

Do I need to buy this capability separately?+

AgenticSuite includes the Astro storefront and all headless and Luma-compatible modules listed on this website. Discuss the complete platform and your implementation scope with us.

Can you migrate my current store while it remains live?+

We can prepare and test a new storefront while the existing store keeps trading. Product, CMS and compatible module-data migration, final data synchronisation and cutover are planned for your specific project.

Does the licence include hosting and a bespoke build?+

Hosting, migration, training and custom development are agreed separately. We can discuss Cloudways for Magento and Cloudflare for the frontend; you can pay the providers directly or request a managed quotation.

Latest release: Version 1.0.2

Headless Email URLs is a Magento 2 module that points Magento’s customer-facing links — transactional emails, sitemap and RSS — at your headless storefront instead of the backend host, without changing any Base URL, so admin, API, media and static assets stay exactly where they are.

Your headless store sends emails. Right now, the links in them point at the wrong website.

The moment you go headless, Magento keeps generating every transactional and marketing email exactly as it always has — order confirmations, invoices, shipment and credit-memo notices, password resets, welcome emails, newsletters — using its own configured base URL. On a headless build, that base URL is your backend: the admin and API host. So the “view your order” link in a customer’s confirmation points at api.yourstore.com, not the yourstore.com they actually know. It looks broken. To a nervous first-time buyer, it looks like phishing. Either way, it quietly burns the trust you paid to earn.

And the obvious fix is a trap. Repoint the shared base link URL at your storefront and you repoint the admin and the API along with it — it is one shared value. More than one team has locked itself out of its own Magento admin doing exactly that.

One setting fixes every email link — and leaves your admin alone

Headless Email URLs installs a precise, area-scoped URL rewrite. It intercepts link generation in the frontend area only — the context Magento uses when it renders an email — and substitutes your real storefront domain for the backend host. The admin, the REST and GraphQL APIs and your media URLs are never touched. Set the storefront URL once and you are done: no template overrides, no core edits, no per-email find-and-replace.

What changes

EmailLink beforeLink after
Order confirmationapi.yourstore.com/…yourstore.com/account/orders
Invoice & shipmentapi.yourstore.com/…yourstore.com/account/orders
Password resetapi.yourstore.com/…yourstore.com/account
Welcome & newsletterapi.yourstore.com/…yourstore.com

How it works

  1. Install the module and open Stores › Configuration › General › Web › Headless Storefront Links.
  2. Enter your storefront URL and save.
  3. Every link Magento renders in an email now resolves to your storefront. The admin and APIs keep using the backend host, exactly as they must.

Why it matters

Transactional emails are the highest-engagement messages you will ever send — open rates north of 60% are normal. Every one is a chance to bring a customer back to your store. Send them to a raw API domain and you waste the click, trip spam filters, and look amateur at the precise moment a buyer is deciding whether to trust you. Small, unglamorous plumbing with an outsized effect on conversion and brand trust — and on a headless store, it is not optional.

FAQ

Why can’t I just change the base URL in config?

Because Magento uses one shared base link URL for the storefront, the admin and the API. Change it for emails and you change it for the admin too — which can lock you out. Headless Email URLs scopes the rewrite to the email (frontend) area so nothing else moves.

Does it touch my API or media URLs?

No. Only link URLs generated in the frontend area are rewritten. REST, GraphQL, the admin and media/static URLs are left exactly as they are.

Does it work with any headless frontend?

Yes — Astro, Hyvä, PWA Studio or a fully custom front end. It works at the Magento layer, so it does not care what renders your storefront.

Part of the headless package

Headless Email URLs is core plumbing for the AgenticEcom Astro storefront and is included in the AgenticEcom Suite. It pairs naturally with SMTP for reliable delivery and Product Alerts, whose price-drop emails link straight back to your storefront thanks to this module.

Frequently asked questions

Will this change my admin or API URL?

No. It only rewrites links generated in the frontend (email) area. Your Base URLs are never modified, so the admin, REST/GraphQL APIs, media and static assets keep using the Magento host.

Why not just set the Base Link URL to my storefront?

Because Magento uses one shared Base Link URL for the storefront, the admin and the API — change it and you change all three, which can lock you out of the admin. This module avoids that entirely.

Does it work with any headless frontend?

Yes. It operates at the Magento layer, so Astro, Hyvä, PWA Studio or a fully custom storefront all benefit — they just need to serve the routes the emails link to (orders, account, and so on).

Pairs well with…

SMTP for reliable delivery, and Product Alerts — whose price-drop emails link straight back to your storefront thanks to this module.

Plan the workflow before installation

Read our AgenticSuite: From Product Selection to Order and Support for the task, native alternatives, supported scope and checks to make before choosing an extension or frontend route.

Magento and PHP compatibility

Compatible with Magento 2.4.9. This module's Composer package accepts PHP 8.4 and PHP 8.5. Use a PHP version supported by your Magento installation and its other dependencies.

SEE THE WHOLE PLATFORM

The capability is one part. AgenticSuite brings it together.

Keep Magento as your commerce engine. Shape the customer experience in Astro Admin, with an integrated module collection behind it.

INSIDE AGENTICSUITE 00:57
LIVE PROOF

A complete B2B catalogue.

Explore SyncComms: approximately 1,000 products, guided finders, category filters and a quotation journey.

Explore SyncComms
90+

Mobile scores achieved.

See the dated mobile lab reports linked from our homepage, or test the live sites yourself. Results depend on the page and test conditions.

View the performance evidence
BUILT AROUND YOUR STORE

Make the move while you trade.

We can scope migrations, frontend rebuilds and new stores. Hosting, migration, training and custom development are agreed separately.

Discuss your project
YOUR NEXT STOREFRONT STARTS HERE

See what AgenticSuite could do for your business.

Explore the working sites, watch the overview, then talk to us about your catalogue and the store you want to build.