<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Fixing Incorrect Magic Link Domain in FusionAuth Emails]]></title><description><![CDATA[<p dir="auto">I’m just starting to work with <strong>Magic Links</strong> in FusionAuth.</p>
<p dir="auto">Our <strong>FusionAuth service</strong> is hosted at <strong><a href="http://company.fusionauth.io" rel="nofollow ugc">company.fusionauth.io</a></strong>, but the <strong>Magic Link</strong> being generated contains <strong>localhost:9011</strong> as the domain.</p>
<p dir="auto">Is there a configuration setting I’m missing?</p>
]]></description><link>https://fusionauth.io/community/forum/topic/2896/fixing-incorrect-magic-link-domain-in-fusionauth-emails</link><generator>RSS for Node</generator><lastBuildDate>Sun, 15 Nov 2026 02:56:26 GMT</lastBuildDate><atom:link href="https://fusionauth.io/community/forum/topic/2896.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 15 Mar 2025 20:45:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fixing Incorrect Magic Link Domain in FusionAuth Emails on Sat, 15 Mar 2025 20:51:26 GMT]]></title><description><![CDATA[<p dir="auto">This behavior is due to <strong>FusionAuth’s default settings</strong> for email templates. The Magic Link URL is <strong>template-driven</strong>, and by default, it may reference a <strong>local development environment</strong> unless explicitly configured.</p>
<p dir="auto"><strong>How to Fix This</strong>:</p>
<ol>
<li>
<p dir="auto"><strong>Customize the Magic Link URL in Email Templates</strong></p>
<ul>
<li>FusionAuth allows you to update the email template directly.</li>
<li>You may want to use the <a href="https://fusionauth.io/docs/customize/cli" rel="nofollow ugc">FusionAuth CLI</a> and version control to manage email templates.</li>
<li>Refer to the <strong>note</strong> in this documentation for details:<br />
<a href="https://fusionauth.io/docs/customize/email-and-messages/templates-replacement-variables#available-email-templates" rel="nofollow ugc">Email Templates &amp; Replacement Variables</a></li>
</ul>
</li>
<li>
<p dir="auto"><strong>Update the Tenant Configuration</strong></p>
<ul>
<li>If you want to avoid changes to the email templates, you can put the link in the tenant object and have your template pull from there. To ensure Magic Links point to the correct domain (<strong><a href="http://auth.example.com" rel="nofollow ugc">auth.example.com</a></strong>), update your <strong>tenant’s data object</strong> using the <strong>Tenant API</strong>:<br />
<a href="https://fusionauth.io/docs/apis/tenants#update-a-tenant" rel="nofollow ugc">Update a Tenant API</a></li>
<li>This API allows you to populate the <strong>tenant.data</strong> object.</li>
<li>Then you can use it in your email templates.</li>
</ul>
</li>
</ol>
<p dir="auto"><strong>Summary</strong></p>
<ul>
<li><strong>Magic Links use email templates</strong>, which may default to <strong>localhost:9011</strong>.</li>
<li><strong>Updating tenant settings</strong> allows you to set the correct domain dynamically.</li>
<li><strong>Use the Tenant API</strong> to configure the Magic Link domain properly.</li>
</ul>
]]></description><link>https://fusionauth.io/community/forum/post/7895</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/7895</guid><dc:creator><![CDATA[wesley]]></dc:creator><pubDate>Sat, 15 Mar 2025 20:51:26 GMT</pubDate></item></channel></rss>