Magento
Headless Email URLs
Run Magento headless and the admin and API live on one host (say magento.yourstore.com) while
your customer-facing storefront lives on another (yourstore.com). But Magento still builds the
links inside transactional emails — order confirmations, invoices, shipment notices, password
resets — using its own Base URL. So customers receive emails that link back to your backend, not
the store they know. Headless Email URLs fixes that with one setting, and without the
dangerous workaround of editing Base Link URL.

Install
Section titled “Install”Install Headless Email URLs with Composer using your AgenticEcom licence key (find it on your My Licences page — one key unlocks every module you own):
# 1. Register the AgenticEcom repository (once per store)composer config repositories.agenticecom composer https://repo.agenticecom.netcomposer config --global --auth http-basic.repo.agenticecom.net <YOUR-LICENCE-KEY> x
# 2. Require this modulecomposer require agenticecom/module-headless-email-url
# 3. Apply itphp bin/magento setup:upgrade && php bin/magento setup:di:compile && php bin/magento cache:flushCompatibility
Section titled “Compatibility”PHP
Frontend
Safety
What it rewrites
Section titled “What it rewrites”The module hooks Magento’s link generation in the frontend area only — the context Magento uses when it renders an email — and swaps the backend host for your storefront URL.
| Surface | Rewritten? |
|---|---|
| Transactional emails (order, invoice, shipment, credit memo, reset, welcome) | ✅ Point at the storefront |
| Newsletter / RSS links | ✅ Point at the storefront |
| XML sitemap entries | ✅ Point at the storefront |
| Admin, REST & GraphQL API URLs | ❌ Stay on the Magento host |
| Media, static & image URLs | ❌ Stay on the Magento host |
Configuration
Section titled “Configuration”Stores → Configuration → General → Web → Headless Storefront Links — it sits right next to Base URLs, the natural home for a setting about which URL customer links use.
-
Set Use Storefront URL for Email & Link URLs to Yes.
-
Enter your Headless Storefront URL — the full customer-facing URL with a trailing slash, e.g.
https://yourstore.com/. -
Save and run
php bin/magento cache:flush. Send yourself a test order email — every link now points at your storefront.
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.