Last updated

Custom domain setup

By default, every Frontegg environment is created with a Frontegg domain ending in .frontegg.com. While this domain is functional, it may lead to unwanted cookie issues caused by third-party cookie blocking and result in a domain that doesn’t align with your brand identity.


Limitations

Note that you can configure one custom domain per environment, and up to two domains in total. If you need to configure additional custom domains, contact us. Note that custom domains for each environment are configured separately.

Configuring a custom domain

To configure custom domains, open the Frontegg portal and navigate to [ENVIRONMENT] → Configurations → Keys & domains → Domains.

To configure a new custom domain, click on Configure, and in the popup dialog box, insert your desired domain name to generate the CNAME record you need for your DNS configuration.

custom-domain


custom-domain

Best practice

A common practice is to use a subdomain as the custom domain because if your app is hosted on app.sample.com and you have an existing A record for that domain, you cannot use app.sample.com as a custom domain on Frontegg. Instead, use a subdomain as the custom domain, like auth.sample.com.


After adding the CNAME to your DNS configuration, click the Verify button. If Frontegg is able to verify the CNAME record, you will see a success message. After a successful setup, you should also see your custom domain listed on the Administration Page's Domain tab with a verified tag. Domain verification typically takes anywhere from a few minutes to a few hours.

If you see a notification that Frontegg is unable to verify your custom domain, please double check that you entered your CNAME correctly in your DNS provider and try again.


custom-domain

Custom domain in Frontend SDKs

Note that when using a custom domain on Frontegg, That domain should also be passed in the baseUrl in the contextOptions of your Frontegg SDK that you integrated and wrapped your application with.