Adding custom domain

To avoid frustrating cookie issues and to enhance your branding, use a custom domain.

By default, you have a Frontegg Domain. This domain ends with .frontegg.com. By using this Frontegg Domain, however, you may encounter unwanted cookie issues and use a domain that is not consistent with your brand.

Read below to learn more.

Why Use a Custom Domain

Avoid Cookie Issues

Some browsers block third party cookies by default. Providing a custom domain as your application UI domain will give you the ability to support these browsers.

Enhance Your Brand

Instead of seeing .frontegg.com in your domain, you might prefer to have your customers see your custom domain. For instance, when your customers use your application to login, your application might direct them to the following URL:

https://your-application.frontegg.com/oauth/account/login

Rather than see a domain with .frontegg.com in it, you might prefer that your customer see your domain instead.

Read below to learn how to configure a custom domain.

Configuring a Custom Domain

In the Frontegg portal, go to Environments ➜ [NAME OF ENVIRONMENT] ➜ Environment Settings ➜ Domains. you can manage your Frontegg Domains. You should see your Frontegg Domain and also a place to add a Custom Domain.


🚧

Environment-Specific

You should manage the custom domain in each of your environment separately.

Configuring a Custom Domain

In the Custom Domain section, click the Configure button. You should see a dialog appear that asks for your domain name and gives you the information you need for creating the CNAME record and the TXT record in your DNS configuration.

As the instructions in the dialog indicate, add the CNAME and TXT records to your DNS configuration with your DNS provider. Then click Save and Verify.


🚧

Use Subdomain as Custom Domain

A common practice is to use a subdomains 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.

📘

SSL Certificate

Frontegg generates an SSL certificate for your custom domain.

The verification process might take up to 5 minutes. As long as it’s in progress, you will see the custom domain status as “Pending”.

Once the verification process is successful and Frontegg is able to verify the CNAME record, you will see this custom domain as “Verified”.

If an Error occurs and the CNAME was not detected, you will see the custom domain as “Error”. If that happens, double-check that you entered your CNAME correctly with your DNS provider and try again.

After a successful setup, you should also see your custom domain listed on the Administration Page's Domain tab with a verified tag.

📘

Frontegg SDK

When you're using a custom domain on Frontegg, that should be also the domain that you're passing as the baseUrl in the contextOptions in your Frontend integration package.